torrque
15-10-2010 13:34:39
This patch contains the following fixes for building on MinGW using OpenAL soft:
- added test for efx.h and changed all #ifdefs to use the resulting variable (HAVE_EFX) instead of OGRE_PLATFORM_WIN32
- added test for boost and POCO (POCO is not tested)
- don't try to build threading support when no threading library is available
- fixed INSTALL by adding ARCHIVE and RUNTIME
Hope this helps and doesn't break anything. Thank you for writing this library, saves writing a lot of boilerplate code.
stickymango
10-11-2010 15:21:20
Finally got around to reviewing this, basically there's nothing wrong with the patch that I could see, however I had an odd issue using Visual Studio where I couldn't see any EFX related functions from within my applications, and this caused my apps to crash.
What appears to happen is that when I build the lib I get all the EFX releated functions exported correctly, but when I try to use them in a project I get 'unresolved external errors'. For some reason the functions wrapped in HAVE_EFX remain invisible to my app.
However, if I defined HAVE_EFX in my client app then they became visible and my app wouldn't crash
Anyway, I've added the following block to OgreOggSoundPreReqs.h:
/**
* Specifies whether EFX enhancements are supported
* 0 - EFX not supported
* 1 - Enable EFX suport
*/
#ifndef HAVE_EFX
#define HAVE_EFX 1
#endif
This unfortuantely counter-acts your code for checking and auto-generating this flag, but it still allows disabling of EFX supported code where it isn't available.
I don't really know why this is the case so if anybody else can fill me in that would be useful, and hopefully lead to solution!
Anyway, thanks for addition to the lib!
torrque
22-11-2010 11:03:22
I think I know what's going on: when compiling the library, cmake defines HAVE_EFX. When building the application HAVE_EFX is not defined (except when setting it manually, as you did). I think the issue can be fixed by writing a config.h file, where HAVE_EFX is defined. The library includes then include config.h and expose the definition to the application.