error compiling on Mac OS X 10.6.6

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

 



Hi folks,

I have a problem with compiling a tutorial application (
http://www.pjsip.org/pjsip/docs/html/page_pjsip_sample_simple_pjsuaua_c.htm).
I compiled a revision 3456 step by step according to a howto with
--prefix/opt/pjsip (./configure --prefix=/opt/pjsip && make dep && make &&
make install). Now when I'am trying to compile my program I'm unable to link
libraries I compiled before. I'm using gcc (i686-apple-darwin10-gcc-4.2.1)
on Mac OS X 10.6.6.

I run:

gcc -o application main.c -L/opt/pjsip/lib/

I got a following error:

efelin$ gcc -o sas main.c -L/opt/pjsip/lib/
Undefined symbols:
  "_pjsua_call_hangup_all", referenced from:
      _main in cc8fnKe5.o
  "_pjsua_perror", referenced from:
      _error_exit in cc8fnKe5.o
  "_pjsua_create", referenced from:
      _main in cc8fnKe5.o
  "_pjsua_acc_add", referenced from:
      _main in cc8fnKe5.o
  "_pjsua_acc_config_default", referenced from:
      _main in cc8fnKe5.o
  "_pj_log_get_level", referenced from:
      _on_incoming_call in cc8fnKe5.o
      _on_call_state in cc8fnKe5.o
  "_pjsua_conf_connect", referenced from:
      _on_call_media_state in cc8fnKe5.o
      _on_call_media_state in cc8fnKe5.o
  "_pjsua_destroy", referenced from:
      _error_exit in cc8fnKe5.o
      _main in cc8fnKe5.o
  "_pjsua_verify_sip_url", referenced from:
      _main in cc8fnKe5.o
  "_pjsua_transport_config_default", referenced from:
      _main in cc8fnKe5.o
  "_pjsua_logging_config_default", referenced from:
      _main in cc8fnKe5.o
  "_pjsua_call_make_call", referenced from:
      _main in cc8fnKe5.o
  "_pjsua_transport_create", referenced from:
      _main in cc8fnKe5.o
  "_pj_str", referenced from:
      _main in cc8fnKe5.o
      _main in cc8fnKe5.o
      _main in cc8fnKe5.o
      _main in cc8fnKe5.o
      _main in cc8fnKe5.o
      _main in cc8fnKe5.o
      _main in cc8fnKe5.o
  "_pjsua_init", referenced from:
      _main in cc8fnKe5.o
  "_pjsua_call_get_info", referenced from:
      _on_incoming_call in cc8fnKe5.o
      _on_call_state in cc8fnKe5.o
      _on_call_media_state in cc8fnKe5.o
  "_pj_log_3", referenced from:
      _on_incoming_call in cc8fnKe5.o
      _on_call_state in cc8fnKe5.o
  "_pjsua_config_default", referenced from:
      _main in cc8fnKe5.o
  "_pjsua_start", referenced from:
      _main in cc8fnKe5.o
  "_pjsua_call_answer", referenced from:
      _on_incoming_call in cc8fnKe5.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

When I specify the library directly I got:

efelin$ gcc -o appliaction main.c -l
/opt/pjsip/lib/libpjsua-i386-apple-darwin10.6.0.a
ld: library not found for
-l/opt/pjsip/lib/libpjsua-i386-apple-darwin10.6.0.a

Libraries are there:

efelin$ ls -la /opt/pjsip/lib/
total 5632
drwxrwxrwx  21 efelin  admin     714 Mar 16 20:05 .
drwxr-xr-x   4 efelin  admin     136 Mar 16 20:05 ..
-rwxrwxrwx   1 efelin  admin   73832 Mar 16 20:05
libg7221codec-i386-apple-darwin10.6.0.a
-rwxrwxrwx   1 efelin  admin   52456 Mar 16 20:05
libgsmcodec-i386-apple-darwin10.6.0.a
-rwxrwxrwx   1 efelin  admin   78112 Mar 16 20:05
libilbccodec-i386-apple-darwin10.6.0.a
-rwxrwxrwx   1 efelin  admin   16392 Mar 16 20:05
libmilenage-i386-apple-darwin10.6.0.a
-rwxrwxrwx   1 efelin  admin  253064 Mar 16 20:05
libpj-i386-apple-darwin10.6.0.a
-rwxrwxrwx   1 efelin  admin  150368 Mar 16 20:05
libpjlib-util-i386-apple-darwin10.6.0.a
-rwxrwxrwx   1 efelin  admin   38992 Mar 16 20:05
libpjmedia-audiodev-i386-apple-darwin10.6.0.a
-rwxrwxrwx   1 efelin  admin   67128 Mar 16 20:05
libpjmedia-codec-i386-apple-darwin10.6.0.a
-rwxrwxrwx   1 efelin  admin  445208 Mar 16 20:05
libpjmedia-i386-apple-darwin10.6.0.a
-rwxrwxrwx   1 efelin  admin  224400 Mar 16 20:05
libpjnath-i386-apple-darwin10.6.0.a
-rwxrwxrwx   1 efelin  admin  423824 Mar 16 20:05
libpjsip-i386-apple-darwin10.6.0.a
-rwxrwxrwx   1 efelin  admin  117712 Mar 16 20:05
libpjsip-simple-i386-apple-darwin10.6.0.a
-rwxrwxrwx   1 efelin  admin  126128 Mar 16 20:05
libpjsip-ua-i386-apple-darwin10.6.0.a
-rwxrwxrwx   1 efelin  admin  254800 Mar 16 20:05
libpjsua-i386-apple-darwin10.6.0.a
-rwxrwxrwx   1 efelin  admin  138272 Mar 16 20:05
libportaudio-i386-apple-darwin10.6.0.a
-rwxrwxrwx   1 efelin  admin   46544 Mar 16 20:05
libresample-i386-apple-darwin10.6.0.a
-rwxrwxrwx   1 efelin  admin  222032 Mar 16 20:05
libspeex-i386-apple-darwin10.6.0.a
-rwxrwxrwx   1 efelin  admin  115536 Mar 16 20:05
libsrtp-i386-apple-darwin10.6.0.a
drwxrwxrwx   3 efelin  admin     102 Mar 16 20:05 pkgconfig

Thanks for an answer, it is driving my crazy.

Kind regards,

Efelin Novak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20110316/16bd8f35/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