Skip to contentSkip to conversation

Building QEMU CVS with DirectSound on MinGW broken

Qemu-devel Robert Riebisch 3 participants 4 messages Feb 1, 2009

lore
Share & tools
lore
#0 lore raw

Hi!

I'm getting this error:
c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/rpcdce.h:369:
error: syntax error before "__attribute__"

I was able to fix this by moving inclusion of dsound.h' above that of qemu-common.h'. The real cause seems to be "#define noreturn __attribute__ ((__noreturn__))" in `qemu-common.h'. This has been added in r6303 and "fixed" in r6330.

Here's my patch for demonstration:
***

dsoundaudio.c renamed from dsoundaudio.c.orig +2 -2
@@ -26,6 +26,8 @@
  * SEAL 1.07 by Carlos 'pel' Hasan was used as documentation
  */
 
+#include <dsound.h>
+
 #include "qemu-common.h"
 #include "audio.h"
 
@@ -35,8 +37,6 @@
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <mmsystem.h>
-#include <objbase.h>
-#include <dsound.h>
 
 /* #define DEBUG_DSOUND */
 

***

I've just removed objbase.h', because it will be included with dsound.h' already.

Robert Riebisch
P.S. I'm using 2002 `directx-devel.tar.gz' from the SDL project.

Signature · 2 lines
BTTR Software
http://www.bttr-software.de/
#1 lore raw
Quoted 10 lines · Robert Riebisch

Hi!

I'm getting this error:
c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/rpcdce.h:369:
error: syntax error before "__attribute__"

I was able to fix this by moving inclusion of dsound.h' above that of qemu-common.h'. The real cause seems to be "#define noreturn __attribute__ ((__noreturn__))" in `qemu-common.h'. This has been added in r6303 and "fixed" in r6330.

Aha, so finally we are at the bottom of things. Thanks.

[..snip..]

Quoted 3 lines

I've just removed objbase.h', because it will be included with dsound.h' already.

The fix however is wrong, Microsoft states that CoCreateInstance should reside in objbase.h thus removing it is wrong, unless somone could find the same being stated about dsound.h always including objbase.

While pretty and seductive the idea of lower case noreturn was always rotten. (Not that one can not make a strong case for blaming w32api developers for that particular way of handling noreturn in rpcdce.h)

Signature · 1 line
mailto:[email protected]
#2 lore raw
In reply to Robert Riebisch

If you are using CVS, please note that it is not being maintained. Please use Subversion(SVN) instead.

Quoted 47 lines · Robert Riebisch

Hi!

I'm getting this error:
c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/rpcdce.h:369:
error: syntax error before "__attribute__"

I was able to fix this by moving inclusion of dsound.h' above that of qemu-common.h'. The real cause seems to be "#define noreturn __attribute__ ((__noreturn__))" in `qemu-common.h'. This has been added in r6303 and "fixed" in r6330.

Here's my patch for demonstration:
***

dsoundaudio.c renamed from dsoundaudio.c.orig +2 -2
@@ -26,6 +26,8 @@
 * SEAL 1.07 by Carlos 'pel' Hasan was used as documentation
 */
 
+#include <dsound.h>
+
 #include "qemu-common.h"
 #include "audio.h"
 
@@ -35,8 +37,6 @@
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <mmsystem.h>
-#include <objbase.h>
-#include <dsound.h>
 
 /* #define DEBUG_DSOUND */
 

***

I've just removed objbase.h', because it will be included with dsound.h' already.

Robert Riebisch
P.S. I'm using 2002 `directx-devel.tar.gz' from the SDL project.

Signature · 2 lines
BTTR Software
http://www.bttr-software.de/
#3 lore raw
Quoted 2 lines · C.W. Betts

If you are using CVS, please note that it is not being maintained.
Please use Subversion(SVN) instead.

Sorry, I meant SVN, of course. :-)

Robert Riebisch

Signature · 2 lines
BTTR Software
http://www.bttr-software.de/