Build problem with Windows header in latest tip

1>------ Build started: Project: Juce_tip, Configuration: Debug Win32 ------
1>  juce_win32_NativeCode.cpp
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\ddraw.h(703): error C2011: '_DDPIXELFORMAT' : 'struct' type redefinition
1>          C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\ksmedia.h(5749) : see declaration of '_DDPIXELFORMAT'
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\ddraw.h(2249): error C2079: '_DDSURFACEDESC::ddpfPixelFormat' uses undefined struct '_DDPIXELFORMAT'
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\ddraw.h(2292): error C2079: '_DDSURFACEDESC2::ddpfPixelFormat' uses undefined struct '_DDPIXELFORMAT'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Ah, that’ll be something to do with the new DirectShow component then.

I don’t get the error with my build, so it’s quite hard for me to fix… Other people have described it here:

but I can’t quite figure out exactly what their suggested fix means. I’ll try moving the headers up like they suggest, and hopefully it’ll work - let me know if you still have problems after my next check-in…



We just need to add one more condition in the very first preprocessor directive in juce_DirectShowComponent.cpp. It should read:


Gotcha. Thanks!