Using xaudio2.h with Mingw GCC gives build errors.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Using xaudio2.h with Mingw GCC gives build errors.

James Franco
I am attempting to port a component from Visual Studio to Codeblocks using Mingw GCC as the compiler. The code includes 

#ifdef _WIN32
#include "config.h"
#include <windows.h>
#include <xaudio2.h>
#endif

Now xaudio on my computer is found only in
C:\Program Files (x86)\Microsoft DirectX SDK (August 2008)\Include

Now I get errors from the following lines in Xaudio2.h

// XAudio 2.2 (August 2008 SDK)
DEFINE_CLSID(XAudio2, b802058a, 464a, 42db, bc, 10, b6, 50, d6, f2, 58, 6a);
DEFINE_CLSID(XAudio2_Debug, 97dfb7e7, 5161, 4015, 87, a9, c7, 9e, 6a, 19, 52, cc);

The errors are:

C:\mingw64\opt\Directx\Include\xaudio2.h|31|error: pasting "b802058a" and "-" does not give a valid preprocessing token|
C:\mingw64\opt\Directx\Include\comdecl.h|40|note: in definition of macro 'DEFINE_CLSID'|
C:\mingw64\opt\Directx\Include\comdecl.h|40|error: pasting "-" and "464a" does not give a valid preprocessing token|
C:\mingw64\opt\Directx\Include\xaudio2.h|31|note: in expansion of macro 'DEFINE_CLSID'|
C:\mingw64\opt\Directx\Include\xaudio2.h|31|error: pasting "464a" and "-" does not give a valid preprocessing token|
C:\mingw64\opt\Directx\Include\comdecl.h|40|note: in definition of macro 'DEFINE_CLSID'|
C:\mingw64\opt\Directx\Include\comdecl.h|40|error: pasting "-" and "42db" does not give a valid preprocessing token|
C:\mingw64\opt\Directx\Include\xaudio2.h|31|note: in expansion of macro 'DEFINE_CLSID'|
C:\mingw64\opt\Directx\Include\xaudio2.h|31|error: pasting "42db" and "-" does not give a valid preprocessing token|
C:\mingw64\opt\Directx\Include\comdecl.h|40|note: in definition of macro 'DEFINE_CLSID'|
C:\mingw64\opt\Directx\Include\comdecl.h|40|error: pasting "-" and "bc" does not give a valid preprocessing token|
C:\mingw64\opt\Directx\Include\xaudio2.h|31|note: in expansion of macro 'DEFINE_CLSID'|
C:\mingw64\opt\Directx\Include\xaudio2.h|31|error: pasting "bc10" and "-" does not give a valid preprocessing token|
C:\mingw64\opt\Directx\Include\comdecl.h|40|note: in definition of macro 'DEFINE_CLSID'|
C:\mingw64\opt\Directx\Include\comdecl.h|40|error: pasting "-" and "b6" does not give a valid preprocessing token|
C:\mingw64\opt\Directx\Include\xaudio2.h|31|note: in expansion of macro 'DEFINE_CLSID'|
C:\mingw64\opt\Directx\Include\xaudio2.h|32|error: pasting "97dfb7e7" and "-" does not give a valid preprocessing token|
C:\mingw64\opt\Directx\Include\comdecl.h|40|note: in definition of macro 'DEFINE_CLSID'|
C:\mingw64\opt\Directx\Include\comdecl.h|40|error: pasting "-" and "5161" does not give a valid preprocessing token|
C:\mingw64\opt\Directx\Include\xaudio2.h|32|note: in expansion of macro 'DEFINE_CLSID'|
C:\mingw64\opt\Directx\Include\xaudio2.h|32|error: pasting "5161" and "-" does not give a valid preprocessing token|


My question is how do I resolve these issues ? Does Mingw come with its own version of Xaudio2.h file ?

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

FW: Using xaudio2.h with Mingw GCC gives build errors.

Earnie Boyd
> Now xaudio on my computer is found only in C:\Program Files
> (x86)\Microsoft DirectX SDK (August 2008)\Include

32bit headers?

> Now I get errors from the following lines in Xaudio2.h

> // XAudio 2.2 (August 2008 SDK)
> DEFINE_CLSID(XAudio2, b802058a, 464a, 42db, bc, 10, b6, 50, d6, f2,
> 58, 6a);  DEFINE_CLSID(XAudio2_Debug, 97dfb7e7, 5161, 4015, 87, a9,
> c7, 9e, 6a, 19, 52, cc);
>
> The errors are:
>
> C:\mingw64\opt\Directx\Include\xaudio2.h|31|error: pasting "b802058a"
> and "-" does not give a valid preprocessing token|
> C:\mingw64\opt\Directx\Include\comdecl.h|40|note: in definition of
> macro 'DEFINE_CLSID'|

64bit Compiler?
Wrong mailing list.

--
Earnie




------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe