Vc++ 6 compile error with dsound header file

what do you make of this:

juce_win32_DirectSound.cpp
c:\program files\development\microsoft visual studio\vc98\include\mmsystem.h(1623) : warning C4201: nonstandard extension used : nameless struct/union
c:\program files\development\microsoft visual studio\vc98\include\mmsystem.h(1627) : warning C4201: nonstandard extension used : nameless struct/union
c:\program files\development\microsoft visual studio\vc98\include\mmsystem.h(1648) : warning C4201: nonstandard extension used : nameless struct/union
c:\program files\development\microsoft visual studio\vc98\include\mmsystem.h(1652) : warning C4201: nonstandard extension used : nameless struct/union
c:\program files\microsoft directx 9.0 sdk (april 2005)\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1'
c:\program files\microsoft directx 9.0 sdk (april 2005)\include\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (april 2005)\include\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (april 2005)\include\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2'
c:\program files\microsoft directx 9.0 sdk (april 2005)\include\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (april 2005)\include\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers

also have this error:

juce_win32_Windowing.cpp
(various union warnings about mmsystem.h)
e:\development\juce\build\win32\platform_specific_code\juce_win32_windowing.cpp(440) : error C2065: 'WS_EX_LAYERED' : undeclared identifier

thoughts?

Looks like a mix up of various versions of the win32 headers. Because there’s about 4 or 5 different sets of MS include files, some of which don’t work with some MS compilers, you’ve got to organise your include path in a way that makes it all happy. Have you been really careful in following the build instructions about the order of includes, and what it says about the various platform SDKs, etc?

yeah, i started to think that include order might be the issue. build instructions, eh? i’ll look for them. i saw the dsw and figured that had everything it needed to know already set up…

okay, got it working. the only platform sdk i could find was for windows 2003 sp1 and specifically didn’t list windows xp as a supported platform. i d/l’d it anyway it seemed to set up fine.

however, the instructions say to use the win64 subdirectory under the include directory of the sdk. there is none, so i just left it off and used the atl/crt/mfc directories directly under include. seemed to work. now i just need to read the “atlthunk.lib” thread…

Yeah, it’s a bit bewildering just how many different types of very-slightly-different header files MS release.