[Openal-devel] Another pkgconfig bug

Prakash Punnoor prakash at punnoor.de
Sun Feb 5 03:50:00 PST 2006


Well, investigating further I wonder how -pthread given back as *CFLAG* is 
going to work in the first place:


gcc -D_XOPEN_SOURCE=500 -D__NO_CTYPE -Wall -ansi -pedantic -g 
-O2 ../examples/hello_world.c ./libalut.so 
-lm ../../../portable/adef/src/.libs/libopenal.so -Wl,--rpath 
-Wl,/usr/local/lib -I../include -I../../../portable/common/include -pthread

works.


But doing compilation and then linking and seperating CFLAGS and LINKING FLAGS 
strictly won't work:

gcc -D_XOPEN_SOURCE=500 -D__NO_CTYPE -Wall -ansi -pedantic -g 
-O2 ../examples/hello_world.c -c  -I../include 
-I../../../portable/common/include -pthread

gcc -D_XOPEN_SOURCE=500 hello_world.o  ./libalut.so 
-lm ../../../portable/adef/src/.libs/libopenal.so -Wl,--rpath 
-Wl,/usr/local/lib

../../../portable/adef/src/.libs/libopenal.so: undefined reference to 
`pthread_create'
../../../portable/adef/src/.libs/libopenal.so: undefined reference to 
`pthread_mutex_trylock'
../../../portable/adef/src/.libs/libopenal.so: undefined reference to 
`pthread_join'
collect2: ld gab 1 als Ende-Status zurück


So the pthreads macro needs to be fixed, I think, to give back -pthread as LIB 
flag and not CFLAG (at least on Linux) or to test -lpthread before -pthread.

-- 
(°=                 =°)
//\ Prakash Punnoor /\\
V_/                 \_V



More information about the Openal-devel mailing list