GCC fail

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

 



Please refrain from opening new threads for the same issue.
It is annoying and complicates follow-up (for example, how can we know to
whom your are replying below? We can only guess by searching your previous
posts in other threads).

About your problem, as Waleed already told you, you should read this
http://www.pjsip.org/using.htm


On Sun, Aug 1, 2010 at 8:51 PM, Shamun toha md <shamun.toha at gmail.com>wrote:

> Dear sir,
>
> Thank you, for your feedback. Still its not working.  You mention to use -L
> and -l, can you be kindly more specific, the whole PJSIP is complicated like
> rocket science, i am trying this for more then 7 days just to compile 10
> lines of code and see the "Hello world".
>
> 14 line code:
> ==========
> #include <pjlib.h>
> #include <pjlib-util.h>
> #include <pjmedia.h>
> #include <pjmedia-codec.h>
> #include <pjsip.h>
> #include <pjsip_simple.h>
> #include <pjsip_ua.h>
> #include <pjsua-lib/pjsua.h>
>
> int main(int argc, char *argv[]) {
>    pj_status_t status;
>    status = pjsua_create();
>   return 0;
> }
>
>
> Tried so far, but not yet working:
> =========================
> [root at example mysip]# gcc -L/usr/local/lib/ myapp.c -lpjsua
> /usr/bin/ld: cannot find -lpjsua
> collect2: ld returned 1 exit status
> [root at example mysip]#
>
> OR
>
> [root at example mysip]# gcc -Wall myapp.c
> /tmp/ccqFqozz.o: In function `main':
> myapp.c:(.text+0xa): undefined reference to `pjsua_create'
> collect2: ld returned 1 exit status
> [root at example mysip]#
>
>
>
>
> Question 1:
> =========
>
> What did you mean by -L ? The libraries folder path like following .a
> extention files? or the trunk file i downloaded using svn checkout?
>
> [root at example mysip]# ls /usr/local/lib/libpj*
> /usr/local/lib/libpj-i686-pc-linux-gnu.a
> /usr/local/lib/libpjmedia-codec-i686-pc-linux-gnu.a
> /usr/local/lib/libpjsip-i686-pc-linux-gnu.a
> /usr/local/lib/libpjsua-i686-pc-linux-gnu.a
> /usr/local/lib/libpjlib-util-i686-pc-linux-gnu.a
> /usr/local/lib/libpjmedia-i686-pc-linux-gnu.a
> /usr/local/lib/libpjsip-simple-i686-pc-linux-gnu.a
> /usr/local/lib/libpjmedia-audiodev-i686-pc-linux-gnu.a
> /usr/local/lib/libpjnath-i686-pc-linux-gnu.a
> /usr/local/lib/libpjsip-ua-i686-pc-linux-gnu.a
> [root at example mysip]#
>
>
> Question 2
> =========
> What did you mean by -lpjsua ? Did you mean to use *pjsua* replace it by *
> APP_LDLIBS* ? after downloading the trunk file, there is a build.mak file
> example as following:
>
> export MACHINE_NAME := auto
> export OS_NAME := auto
> export HOST_NAME := unix
> export CC_NAME := gcc
> export TARGET_NAME := i686-pc-linux-gnu
> export CROSS_COMPILE :=
> export LINUX_POLL := select
>
> export ac_prefix := /usr/local
>
> LIB_SUFFIX = $(TARGET_NAME).a
>
> export APP_LDLIBS := -lpjsua-$(TARGET_NAME)\
>     -lpjsip-ua-$(TARGET_NAME)\
>     -lpjsip-simple-$(TARGET_NAME)\
>     -lpjsip-$(TARGET_NAME)\
>     -lpjmedia-codec-$(TARGET_NAME)\
>     -lpjmedia-$(TARGET_NAME)\
>     -lpjmedia-audiodev-$(TARGET_NAME)\
>     -lpjnath-$(TARGET_NAME)\
>     -lpjlib-util-$(TARGET_NAME)\
>     $(APP_THIRD_PARTY_LIBS)\
>     $(APP_THIRD_PARTY_EXT)\
>     -lpj-$(TARGET_NAME)\
>     -lm -lnsl -lrt -lpthread
>
>
> Looking forward... :o(
>
>
> Thank you
> Best regards
> Shamun
>
>
>
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20100802/ca0a3c23/attachment-0001.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