link to pjsip by putting -L after -o

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

 



Hi list,
The following two gcc commands look identical to me but the second
onedoesn't work. They both link pjsip library to "foo".
[pass] gcc -o foo foo.o
-L/usr/local/lib-lpjsip-x86_64-unknown-linux-gnu -lxxxxxxxxx[fail] gcc
-L/usr/local/lib -lpjsip-x86_64-unknown-linux-gnu-lxxxxxxxxx -o foo
foo.o
For the failed command, GCC complains about "undefined reference to pj_xxxx".
This has not been a problem for me until I try to put pjproject
sourceinside of my source using autotools. Autotools always puts -o
andfriends at the very end of the command line and my build would
fail.
Can someone please explain the magic?
Cheers,
kel



[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