Compiling problem with openal (and caudio too)
Posted: Fri Aug 09, 2013 1:12 am
I tried all day to build the dynamic library for openal to use it with the exmaples but with no success, so I went through a regular installation (apt-get install) and I still can't build the examples. With that command line : gcc -o test alreverb.c -lopenal
I get errors like these :
Basically I just want to compile the examples if someone knows what I'm doing wrong.
After the "getting mad" time I found the caudio wrapper and tried to build it as explained :
Everything is okay and then :
It goes through the whole library compilation and then stops when it comes to build the examples (damn examples
)
It looks like it needs the pthread lib but I don't really know where to add it (and it seems weird that a needed lib is not set in the cmakelists.
It would spare me a lot of pain if someone knew what (certainly stupid) mistakes I'm doing.
edit : btw I'm on ubuntu 12.04 lts
I get errors like these :
Code: Select all
In file included from alreverb.c:42:0:
common/alhelpers.h:29:48: erreur: unknown type name ‘LPALISBUFFERFORMATSUPPORTEDSOFT’
alreverb.c:46:1: erreur: unknown type name ‘LPALBUFFERSAMPLESSOFT’
alreverb.c:103:9: note: expected ‘ALfloat *’ but argument is of type ‘const float *’
After the "getting mad" time I found the caudio wrapper and tried to build it as explained :
Code: Select all
cmake ../ -DCAUDIO_DEPENDENCIES_DIR=../Dependencies/
Code: Select all
make -j4
![Laughing :lol:](./images/smilies/icon_lol.gif)
Code: Select all
../../cAudio/libcAudio.so: error: undefined reference to 'pthread_mutexattr_init'
../../cAudio/libcAudio.so: error: undefined reference to 'pthread_mutexattr_settype'
../../cAudio/libcAudio.so: error: undefined reference to 'pthread_mutexattr_destroy'
../../cAudio/libcAudio.so: error: undefined reference to 'dlerror'
../../cAudio/libcAudio.so: error: undefined reference to 'dlclose'
../../cAudio/libcAudio.so: error: undefined reference to 'dlopen'
../../cAudio/libcAudio.so: error: undefined reference to 'dlsym'
../../cAudio/libcAudio.so: error: undefined reference to 'pthread_join'
../../cAudio/libcAudio.so: error: undefined reference to 'pthread_create'
It would spare me a lot of pain if someone knew what (certainly stupid) mistakes I'm doing.
edit : btw I'm on ubuntu 12.04 lts