GNOME Bugzilla – Bug 437539
Compilation of DirectDraw and DirectSound plugins using mingw32 doesn't work
Last modified: 2007-05-15 17:26:48 UTC
Please describe the problem: Currently the DirectShow and DirectSound plugins are not compilable using autofoo and mingw32. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 87982 [details] [review] Proposed Patch
It would be great if you could add the actual compiler/make output to the bug report when stuff fails in future, instead of just saying 'does not compile' :) I don't really understand the stuff with the DIRECTDRAW_LDFLAGS and DIRECTSOUND_LDFLAGS - I don't think those are or should be used? Is adding the *_CFLAGS not enough to make things work?
Here is a log of a conversation explaining the FLAGS <asabil> __tim, ping ? <__tim> hey <asabil> yeah it is about the DirectSound and DirectDraw parch I submitted <asabil> actually the configure.ac ac_link_ifelse fails because it doesn't find the headers <asabil> and also we introduced the DIRECTSOUND_ <asabil> DIRECT*_CFLAGS and DIRECT*_LDFLAGS to avoid poluting the global CFLAGS <asabil> because those contains -Isource/to/directx/sdk/headers <asabil> and that may conflict with the standard mingw headers sometimes * chrisbudden14 (n=chrisbud@195.194.27.101) has joined #gstreamer <asabil> basically this is how we cross compile using mingw32 : <asabil> DIRECTDRAW_CFLAGS="-I/home/asabil/Devel/gstreamer/dependencies/DirectXSDK/Include" DIRECTSOUND_CFLAGS="-I/home/asabil/Devel/gstreamer/dependencies/DirectXSDK/Include" PREFIX="/home/asabil/Devel/gstreamer/build" ./mingw-configure --enable-explicit-deps=no --disable-tests --with-check=no --disable-x <__tim> asabil: well, put it all in the bug report please :) <asabil> ok am gonna paste this conversation as a comment :D <__tim> asabil: I still don't understand the LDFLAGS stuff though - are those set/used anywhere? <asabil> yes, in case we would like to use the Microsoft .lib files instead of the mingw ones <asabil> because mingw32 includes the library files for directX but doesn't include all the headers <asabil> :D <asabil> to get this crap to compile we use the headers from microsoft and the libraries from mingw ;)
Another question: why the addition here: - DIRECTDRAW_LIBS="-lddraw -lgdi32" + DIRECTDRAW_LIBS="-lddraw -ldxguid -lgdi32" It is my understanding that it worked before without this. Is this something that is specific to your particular (somewhate hackish) cross-compile setup?
Don't really grok it completely, but it doesn't look like it'll break anything, so applied for now: 2007-05-15 Tim-Philipp Müller <tim at centricular dot net> * configure.ac: * sys/directdraw/Makefile.am: * sys/directsound/Makefile.am: Add DIRECTDRAW_CFLAGS and DIRECTSOUND_CFLAGS to Makefile.am; save and restore the various flags in the directdraw/directsound detection section. Apparently improves cross-compiling for win32 with mingw32 under some circumstances (#437539). <asabil> __tim, you asked on friday about -ldxguid ? <asabil> __tim, it seems like dxguid is generally always used by dx application <asabil> it basically contains the mapping of guids to some more friendly names