On 3/20/08, Sa?l Ibarra <saghul at gmail.com> wrote: > Hi: > > This is my firs mail to the list :) I'm starting a small project for > university with pjsip. I'm using version 0.8.0 compiled this way: > > ./configure --disable-speex-aec --disable-l16-codec > --disable-speex-codec --disable-ssl > make dep && make > > My Makefile looks like this: I think you're using the old instruction which requires the app's Makefile to specify all the libraries, and you missed specifying all the enabled codecs. The new (well, since 0.5.10.2) instruction is much simpler, you can see it here: http://trac.pjsip.org/repos/wiki/Getting_Started_Using or here: http://www.pjsip.org/using.htm#using cheers, -benny > PJBASE=pjproject-0.8.0 > > include $(PJBASE)/build.mak > > CC=$(CROSS_COMPILE)$(CC_NAME) > > # Remove components that you don't need from the following definitions. > LDFLAGS=-L${PJBASE}/pjlib/lib\ > -L${PJBASE}/pjlib-util/lib\ > -L${PJBASE}/pjmedia/lib\ > -L${PJBASE}/pjnath/lib\ > -L${PJBASE}/pjsip/lib > > LDLIBS=-lpjsua-${TARGET_NAME}\ > -lpjsip-ua-${TARGET_NAME}\ > -lpjsip-simple-${TARGET_NAME}\ > -lpjsip-${TARGET_NAME}\ > -lpjmedia-codec-${TARGET_NAME}\ > -lpjmedia-${TARGET_NAME}\ > -lpjnath-${TARGET_NAME}\ > -lpjlib-util-${TARGET_NAME}\ > -lpj-${TARGET_NAME}\ > -lm\ > -lpthread > > CFLAGS=-I${PJBASE}/pjlib/include\ > -I${PJBASE}/pjlib-util/include\ > -I${PJBASE}/pjmedia/include\ > -I${PJBASE}/pjnath/include\ > -I${PJBASE}/pjsip/include\ > -DPJ_AUTOCONF=1 > > CPPFLAGS=${CFLAGS} > > > But when I try to 'make' simple_pjsua, I get this linking errors: > > saghul at homer:~/PFC/pruebas$ make > gcc -o hello-world hello-world.c -Ipjproject-0.8.0/pjlib/include > -Ipjproject-0.8.0/pjlib-util/include -Ipjproject-0.8.0/pjmedia/include > -Ipjproject-0.8.0/pjnath/include -Ipjproject-0.8.0/pjsip/include > -DPJ_AUTOCONF=1 -Lpjproject-0.8.0/pjlib/lib > -Lpjproject-0.8.0/pjlib-util/lib -Lpjproject-0.8.0/pjmedia/lib > -Lpjproject-0.8.0/pjnath/lib -Lpjproject-0.8.0/pjsip/lib > -lpjsua-i686-pc-linux-gnu -lpjsip-ua-i686-pc-linux-gnu > -lpjsip-simple-i686-pc-linux-gnu -lpjsip-i686-pc-linux-gnu > -lpjmedia-codec-i686-pc-linux-gnu -lpjmedia-i686-pc-linux-gnu > -lpjnath-i686-pc-linux-gnu -lpjlib-util-i686-pc-linux-gnu > -lpj-i686-pc-linux-gnu -lm -lpthread > pjproject-0.8.0/pjmedia/lib/libpjmedia-codec-i686-pc-linux-gnu.a(gsm.o): > In function `gsm_codec_close': > gsm.c:(.text+0x30b): undefined reference to `gsm_destroy' > gsm.c:(.text+0x320): undefined reference to `gsm_destroy' > pjproject-0.8.0/pjmedia/lib/libpjmedia-codec-i686-pc-linux-gnu.a(gsm.o): > In function `gsm_codec_decode': > gsm.c:(.text+0x475): undefined reference to `gsm_decode' > pjproject-0.8.0/pjmedia/lib/libpjmedia-codec-i686-pc-linux-gnu.a(gsm.o): > In function `gsm_codec_encode': > gsm.c:(.text+0x5c0): undefined reference to `gsm_encode' > pjproject-0.8.0/pjmedia/lib/libpjmedia-codec-i686-pc-linux-gnu.a(gsm.o): > In function `gsm_codec_open': > gsm.c:(.text+0x673): undefined reference to `gsm_create' > gsm.c:(.text+0x67e): undefined reference to `gsm_create' > pjproject-0.8.0/pjmedia/lib/libpjmedia-codec-i686-pc-linux-gnu.a(ilbc.o): > In function `ilbc_codec_recover': > ilbc.c:(.text+0x344): undefined reference to `iLBC_decode' > pjproject-0.8.0/pjmedia/lib/libpjmedia-codec-i686-pc-linux-gnu.a(ilbc.o): > In function `ilbc_codec_decode': > ilbc.c:(.text+0x483): undefined reference to `iLBC_decode' > pjproject-0.8.0/pjmedia/lib/libpjmedia-codec-i686-pc-linux-gnu.a(ilbc.o): > In function `ilbc_codec_encode': > ilbc.c:(.text+0x5b9): undefined reference to `iLBC_encode' > pjproject-0.8.0/pjmedia/lib/libpjmedia-codec-i686-pc-linux-gnu.a(ilbc.o): > In function `ilbc_codec_open': > ilbc.c:(.text+0x775): undefined reference to `initEncode' > ilbc.c:(.text+0x7b4): undefined reference to `initDecode' > pjproject-0.8.0/pjmedia/lib/libpjmedia-i686-pc-linux-gnu.a(errno.o): > In function `pjmedia_strerror': > errno.c:(.text+0xad): undefined reference to `Pa_GetErrorText' > pjproject-0.8.0/pjmedia/lib/libpjmedia-i686-pc-linux-gnu.a(resample_resample.o): > In function `pjmedia_resample_create': > resample_resample.c:(.text+0x175): undefined reference to `res_GetXOFF' > pjproject-0.8.0/pjmedia/lib/libpjmedia-i686-pc-linux-gnu.a(resample_resample.o): > In function `pjmedia_resample_run': > resample_resample.c:(.text+0x23d): undefined reference to `res_SrcLinear' > resample_resample.c:(.text+0x29c): undefined reference to `res_Resample' > pjproject-0.8.0/pjmedia/lib/libpjmedia-i686-pc-linux-gnu.a(pasound.o): > In function `pjmedia_snd_deinit': > pasound.c:(.text+0x31): undefined reference to `Pa_Terminate' > pjproject-0.8.0/pjmedia/lib/libpjmedia-i686-pc-linux-gnu.a(pasound.o): > In function `pjmedia_snd_stream_close': > pasound.c:(.text+0x107): undefined reference to `Pa_CloseStream' > pasound.c:(.text+0x11d): undefined reference to `Pa_CloseStream' > pjproject-0.8.0/pjmedia/lib/libpjmedia-i686-pc-linux-gnu.a(pasound.o): > In function `pjmedia_snd_stream_stop': > pasound.c:(.text+0x203): undefined reference to `Pa_StopStream' > pasound.c:(.text+0x219): undefined reference to `Pa_StopStream' > pjproject-0.8.0/pjmedia/lib/libpjmedia-i686-pc-linux-gnu.a(pasound.o): > In function `pjmedia_snd_stream_start': > pasound.c:(.text+0x294): undefined reference to `Pa_StartStream' > pasound.c:(.text+0x2d0): undefined reference to `Pa_StartStream' > pasound.c:(.text+0x2e1): undefined reference to `Pa_StopStream' > pjproject-0.8.0/pjmedia/lib/libpjmedia-i686-pc-linux-gnu.a(pasound.o): > In function `pa_get_default_output_dev': > pasound.c:(.text+0x34d): undefined reference to `Pa_GetHostApiCount' > pasound.c:(.text+0x364): undefined reference to `Pa_GetHostApiInfo' > pasound.c:(.text+0x379): undefined reference to `Pa_GetDeviceInfo' > pasound.c:(.text+0x38d): undefined reference to `Pa_GetDeviceCount' > pasound.c:(.text+0x3ab): undefined reference to `Pa_GetDeviceInfo' > pjproject-0.8.0/pjmedia/lib/libpjmedia-i686-pc-linux-gnu.a(pasound.o): > In function `pa_get_default_input_dev': > pasound.c:(.text+0x3ed): undefined reference to `Pa_GetHostApiCount' > pasound.c:(.text+0x404): undefined reference to `Pa_GetHostApiInfo' > pasound.c:(.text+0x419): undefined reference to `Pa_GetDeviceInfo' > pasound.c:(.text+0x42d): undefined reference to `Pa_GetDeviceCount' > pasound.c:(.text+0x44b): undefined reference to `Pa_GetDeviceInfo' > pjproject-0.8.0/pjmedia/lib/libpjmedia-i686-pc-linux-gnu.a(pasound.o): > In function `pjmedia_snd_init': > pasound.c:(.text+0x719): undefined reference to `PaUtil_SetDebugPrintFunction' > pasound.c:(.text+0x726): undefined reference to `Pa_Initialize' > pasound.c:(.text+0x77c): undefined reference to `Pa_GetHostApiCount' > pjproject-0.8.0/pjmedia/lib/libpjmedia-i686-pc-linux-gnu.a(pasound.o): > In function `pjmedia_snd_get_dev_info': > pasound.c:(.text+0x7ce): undefined reference to `Pa_GetDeviceInfo' > pjproject-0.8.0/pjmedia/lib/libpjmedia-i686-pc-linux-gnu.a(pasound.o): > In function `pjmedia_snd_stream_get_info': > pasound.c:(.text+0x894): undefined reference to `Pa_GetStreamInfo' > pasound.c:(.text+0x8ad): undefined reference to `Pa_GetStreamInfo' > pjproject-0.8.0/pjmedia/lib/libpjmedia-i686-pc-linux-gnu.a(pasound.o): > In function `pjmedia_snd_open_player': > pasound.c:(.text+0xa4b): undefined reference to `Pa_GetDeviceInfo' > pasound.c:(.text+0xb75): undefined reference to `Pa_GetHostApiInfo' > pasound.c:(.text+0xbc3): undefined reference to `Pa_OpenStream' > pasound.c:(.text+0xbd4): undefined reference to `Pa_GetStreamInfo' > pjproject-0.8.0/pjmedia/lib/libpjmedia-i686-pc-linux-gnu.a(pasound.o): > In function `pjmedia_snd_open_rec': > pasound.c:(.text+0xd08): undefined reference to `Pa_GetDeviceInfo' > pasound.c:(.text+0xe34): undefined reference to `Pa_GetHostApiInfo' > pasound.c:(.text+0xe82): undefined reference to `Pa_OpenStream' > pasound.c:(.text+0xe93): undefined reference to `Pa_GetStreamInfo' > pjproject-0.8.0/pjmedia/lib/libpjmedia-i686-pc-linux-gnu.a(pasound.o): > In function `pjmedia_snd_open': > pasound.c:(.text+0xfc5): undefined reference to `Pa_GetDeviceInfo' > pasound.c:(.text+0xfe0): undefined reference to `Pa_GetDeviceInfo' > pasound.c:(.text+0x110d): undefined reference to `Pa_GetHostApiInfo' > pasound.c:(.text+0x116c): undefined reference to `Pa_GetHostApiInfo' > pasound.c:(.text+0x11ad): undefined reference to `Pa_GetStreamInfo' > pasound.c:(.text+0x11ca): undefined reference to `Pa_GetStreamInfo' > pasound.c:(.text+0x126e): undefined reference to `Pa_OpenStream' > pasound.c:(.text+0x12b7): undefined reference to `Pa_OpenStream' > pasound.c:(.text+0x12cd): undefined reference to `Pa_CloseStream' > pasound.c:(.text+0x130b): undefined reference to `Pa_GetDeviceInfo' > pasound.c:(.text+0x136e): undefined reference to `Pa_OpenStream' > pjproject-0.8.0/pjmedia/lib/libpjmedia-i686-pc-linux-gnu.a(pasound.o): > In function `pjmedia_snd_get_dev_count': > pasound.c:(.text+0x485): undefined reference to `Pa_GetDeviceCount' > collect2: ld returned 1 exit status > make: *** [hello-world] Error 1 > > > I think it's a library linking issue, but I can't get it work. > > I've been browsing the archive, and found some similar cases, but > couldn't manage to solve it. Any help will be appreciated. > > Thanks in advance! > > > PS: Sorry for that long mail. > > -- > Sa?l -- "Nunca subestimes el ancho de banda de un cami?n lleno de disketes." > ---------------------------------------------------------------- > http://www.saghul.net/ > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >