« Return to Thread: Static libray of OpenAl Without DLL (For visual studio project)

Re: Static libray of OpenAl Without DLL (For visual studioproject)

by wassim_belhadj :: Rate this Message:

Reply to Author | View in Thread



Thank you very much for your help
You are really very nice ...
In fact I changed the files "al.h" and "OpenAL32.c" as you told me.
I do not use the library ALUT therefore I have not changed the file
"alut.h".
Then, I build  to have a static libray  and I added it  to my
project(visual studioproject).
All works well but when i try to open the device i have an error.
When I recover the devices name  via function "alcGetString" it was bizarre
(Wave File Writer)
This not been the name of my sound card so  "alcOpenDevice"  function
generates an error when it try to open device.
NB:The same project works when I use dynamic OpenAL.
Thanks in advance


On Wed, 18 Jun 2008 22:09:12 +0200, Andre Krause <post@...>
wrote:

> 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();
> }
> *******************************************************************

_______________________________________________
Openal mailing list
Openal@...
http://opensource.creative.com/mailman/listinfo/openal

 « Return to Thread: Static libray of OpenAl Without DLL (For visual studio project)

LightInTheBox - Buy quality products at wholesale price!