[Openal] Static libray of OpenAl Without DLL (For visual studio
project)
Andre Krause
post at andre-krause.net
Wed Jun 18 13:09:12 PDT 2008
a minimalistic howto:
*******************************************************************
to build static freealut:
replace in alut.h:
#define AL_API __declspec(dllimport)
with
#define AL_API extern
*******************************************************************
to build a static openal library under windows 32,
in "OpenAL32.c" add:
void InitialiseOpenALDLL()
{
DllMain(NULL,DLL_PROCESS_ATTACH,NULL);
}
void DestroyOpenALDLL()
{
DllMain(NULL,DLL_PROCESS_DETACH,NULL);
}
///////////////////////////////////////
in al.h and alut.h:
replace
#define AL_API __declspec(dllimport)
with
#define AL_API
in al.h add:
void InitialiseOpenALDLL();
void DestroyOpenALDLL();
///////////////////////////////////////
int main(int argc, char* argv[])
{
InitialiseOpenALDLL();
...
DestroyOpenALDLL();
}
*******************************************************************
More information about the Openal
mailing list