[Openal-devel] Build on MSVC issue
Michał Cichoń
michcic at gmail.com
Wed Apr 27 18:19:16 PDT 2011
In order to build OpenAL-Soft with MSVC those line has to be added to
alu.h (for example before M_PI definition):
#ifdef _MSC_VER
#define snprintf _snprintf
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
#define isnan _isnan
#endif
Function listed above has different naming under MSVC. This quick hack
is, well... quick. Probably better solution will be to define
prototypes like al_strcasecmp, etc.
Example:
#ifdef _MSC_VER
#define al_sprintf _sprintf
#define al_strcasecmp _stricmp
...
#else
#define al_sprintf sprintf
#define al_strcasecmp strcasecmp
...
#endif
I can confirm that with above fix OpenAL compile well using: MSVC
2005, 2008, 2010, MinGW GCC 3.4.5, 4.2.1, 4.4.0, 4.5.0.
--
thedmd, Michał Cichoń
Artifex Mundi
michcic at gmail.com
http://www.artifexmundi.com
More information about the Openal-devel
mailing list