Compilation (or linking) error when building sample mix.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,


I've installed the PJSIP libraries as explained at http://trac.pjsip.org/repos/wiki/Getting-Started/Autoconf#Runningconfigure.?


I've then created a C project with Makefile as follows:?


all: mix

mix: mix.c
$(CC) -o $@ $< `pkg-config --cflags --libs libpjproject`

clean:
rm -f mix.o mix

And, when I build the project, I get the following error:

11:09:26 **** Incremental Build of configuration Debug for project Mix ****
make all
cc -o mix mix.c `pkg-config --cflags --libs libpjproject`
/usr/local/lib/libpjmedia-x86_64-unknown-linux-gnu.a(conference.o): In function `create_sound_port':
conference.c:(.text+0x692): undefined reference to `pjmedia_aud_stream_get_param'
conference.c:(.text+0x6b3): undefined reference to `pjmedia_aud_dev_get_info'
conference.c:(.text+0x745): undefined reference to `pjmedia_aud_dev_get_info'
/usr/local/lib/libpjmedia-x86_64-unknown-linux-gnu.a(endpoint.o): In function `pjmedia_endpt_create':
endpoint.c:(.text+0x14f): undefined reference to `pjmedia_aud_subsys_init'
endpoint.c:(.text+0x1b0): undefined reference to `pjmedia_aud_subsys_shutdown'
/usr/local/lib/libpjmedia-x86_64-unknown-linux-gnu.a(endpoint.o): In function `pjmedia_endpt_destroy':
endpoint.c:(.text+0x4fd): undefined reference to `pjmedia_aud_subsys_shutdown'
/usr/local/lib/libpjmedia-x86_64-unknown-linux-gnu.a(sound_port.o): In function `pjmedia_snd_port_destroy':
sound_port.c:(.text+0x2e6): undefined reference to `pjmedia_aud_stream_stop'
sound_port.c:(.text+0x2f2): undefined reference to `pjmedia_aud_stream_destroy'
/usr/local/lib/libpjmedia-x86_64-unknown-linux-gnu.a(sound_port.o): In function `pjmedia_snd_port_set_ec':
sound_port.c:(.text+0x3ec): undefined reference to `pjmedia_aud_stream_get_param'
sound_port.c:(.text+0x515): undefined reference to `pjmedia_aud_stream_get_cap'
sound_port.c:(.text+0x561): undefined reference to `pjmedia_aud_stream_set_cap'
sound_port.c:(.text+0x5cf): undefined reference to `pjmedia_aud_stream_set_cap'
sound_port.c:(.text+0x60e): undefined reference to `pjmedia_aud_stream_set_cap'
/usr/local/lib/libpjmedia-x86_64-unknown-linux-gnu.a(sound_port.o): In function `start_sound_device':
sound_port.c:(.text+0x7a0): undefined reference to `pjmedia_aud_stream_create'
sound_port.c:(.text+0x815): undefined reference to `pjmedia_aud_stream_destroy'
sound_port.c:(.text+0x845): undefined reference to `pjmedia_aud_stream_start'
sound_port.c:(.text+0x85c): undefined reference to `pjmedia_aud_stream_destroy'
sound_port.c:(.text+0x899): undefined reference to `pjmedia_aud_dev_get_info'
/usr/local/lib/libpjmedia-x86_64-unknown-linux-gnu.a(sound_port.o): In function `pjmedia_snd_port_create_player':
sound_port.c:(.text+0xb14): undefined reference to `pjmedia_aud_dev_default_param'
/usr/local/lib/libpjmedia-x86_64-unknown-linux-gnu.a(sound_port.o): In function `pjmedia_snd_port_create_rec':
sound_port.c:(.text+0xbe4): undefined reference to `pjmedia_aud_dev_default_param'
/usr/local/lib/libpjmedia-x86_64-unknown-linux-gnu.a(sound_port.o): In function `pjmedia_snd_port_create':
sound_port.c:(.text+0xcb4): undefined reference to `pjmedia_aud_dev_default_param'
/usr/local/lib/libpjmedia-x86_64-unknown-linux-gnu.a(sound_port.o): In function `pjmedia_snd_port_get_ec_tail':
sound_port.c:(.text+0xdd2): undefined reference to `pjmedia_aud_stream_get_cap'
sound_port.c:(.text+0xe08): undefined reference to `pjmedia_aud_stream_get_cap'
collect2: ld returned 1 exit status
make: *** [mix] Error 1

11:09:26 Build Finished (took 415ms)


I precise that building another sample (pcaputil) works properly using exactly the same steps.


Thanks,

Mickael


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20140413/73d0732d/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux