Hi Jesse,
Jesse Allen schreef:
Maartan,
In a patch committed on 10 Jul 2008, includes: Add video mixing renderer header, it included a construct that autogenerates this piece of code for strmif.h
" typedef struct tagVMRGUID { GUID *pGUID; GUID GUID; } VMRGUID; "
Unfortunately any C++ file that includes that header seems to miscompile.
" #include <strmif.h> "
produces with wineg++
In file included from blarg.c:1: /home/jesse/build/wine/include/strmif.h:8972: error: declaration of 'GUID tagVMRGUID::GUID' /home/jesse/build/wine/include/guiddef.h:31: error: changes meaning of 'GUID' from 'typedef struct _GUID GUID' winegcc: g++ failed
This is also a problem in the DXSDK when compiling with g++, I suppose. This is explained here: http://home.clara.net/raoulgough/vidmodem/dshow.html
I tried patching the vmrender.idl similar to this: " typedef struct tagVMRGUID { #if defined(__cplusplus) GUID *pGUID, ::GUID; #else GUID *pGUID, GUID; #endif } VMRGUID; "
Judging by that link you sent me, shouldn't it be:
typedef struct tagVMRGUID { #if defined(__cplusplus) ::GUID *pGUID, GUID; #else GUID *pGUID, GUID; #endif } VMRGUID;
Or am i reading that link wrong?
But no go. It still produces the same problem. Obviously you can't have the ::GUID prefixed and work on gcc as much as you can have the GUID GUID in g++. But I think we will need it, otherwise I will just have to hack the strmif.h everytime.
Can you take a look at the problem? I think we will want this to work for winelib on g++ as it's pretty well dependent.
Main problem is of course the msvc compiler doesn't have that problem, but if that ifdef works perhaps it's possible to have it like that.
Cheers, Maarten.
On Tue, Aug 11, 2009 at 7:30 AM, Maarten Lankhorstm.b.lankhorst@gmail.com wrote:
Hi Jesse,
Judging by that link you sent me, shouldn't it be:
typedef struct tagVMRGUID { #if defined(__cplusplus) ::GUID *pGUID, GUID; #else GUID *pGUID, GUID; #endif } VMRGUID;
Or am i reading that link wrong?
Oh that may have been the correct way for vmrender.idl, but the patch you proposed of protecting with a struct does compile. My app does not use a VMRGUID, so I don't know if it really works :)
Jesse
Hi Jesse,
2009/8/12 Jesse Allen the3dfxdude@gmail.com:
Oh that may have been the correct way for vmrender.idl, but the patch you proposed of protecting with a struct does compile. My app does not use a VMRGUID, so I don't know if it really works :)
Commit a664043e1d1e93bcbe2 fixes this in the cleanest way for wine, if you know any other spots where wine headers fail to compile with g++ let me know.
Cheers, Maarten.
On Tue, Aug 18, 2009 at 7:44 AM, Maarten Lankhorstm.b.lankhorst@gmail.com wrote:
Hi Jesse,
2009/8/12 Jesse Allen the3dfxdude@gmail.com:
Oh that may have been the correct way for vmrender.idl, but the patch you proposed of protecting with a struct does compile. My app does not use a VMRGUID, so I don't know if it really works :)
Commit a664043e1d1e93bcbe2 fixes this in the cleanest way for wine, if you know any other spots where wine headers fail to compile with g++ let me know.
Cheers, Maarten.
Well, not g++ problems, but I do actually have two more patches in my tree on the includes. I will send them in sometime soon.
Jesse