Find the answer to your Linux question:
Results 1 to 2 of 2
I am using a library, jrtplib in a small application. I compiled the library and installed it successfully, it is installed here: /usr/local/lib/libjrtp.so-2.9 in KDevelop, I added a reference to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2004
    Location
    Finland
    Posts
    17

    Including a third part library in KDevelop


    I am using a library, jrtplib in a small application. I compiled the library and installed it successfully, it is installed here:

    /usr/local/lib/libjrtp.so-2.9


    in KDevelop, I added a reference to the include folder:
    /usr/local/include/jrtplib
    (by going to Automake manager> options> Includes> Directories Outside Project, and added:
    -I/usr/local/include/jrtplib (captical i)

    then i added the library itself (so file) as:
    Automake Manager > Options >Libraries > Link Libraries outside project (LDADD), and added:
    -l/usr/local/lib/libjrtp.so-2.9 (small L, as in letter)

    Then Automake, configure...etc...then build project...
    the project compiles fine, and supposedly linked fine, as there was no error indicated, here is the output of this operation:

    Code:
    *cd "/root/audiotesting" && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" gmake -f Makefile.cvs && cd "/root/audiotesting/debug" && CXXFLAGS="-O0 -g3" "/root/audiotesting/configure" --enable-debug=full && cd "/root/audiotesting/debug" && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" gmake -k  
    */usr/share/aclocal/vorbis.m4:9: warning: underquoted definition of XIPH_PATH_VORBIS 
    */usr/share/aclocal/pkg.m4:5: warning: underquoted definition of PKG_CHECK_MODULES 
    */usr/share/aclocal/pilot-link.m4:1: warning: underquoted definition of AC_PILOT_LINK_HOOK 
    */usr/share/aclocal/ogg.m4:8: warning: underquoted definition of XIPH_PATH_OGG 
    */usr/share/aclocal/oaf.m4:4: warning: underquoted definition of AM_PATH_OAF 
    */usr/share/aclocal/linc.m4:1: warning: underquoted definition of AM_PATH_LINC 
    */usr/share/aclocal/libole2.m4:18: warning: underquoted definition of AM_PATH_LIBOLE2 
    */usr/share/aclocal/libmikmod.m4:11: warning: underquoted definition of AM_PATH_LIBMIKMOD 
    */usr/share/aclocal/libguppi.m4:11: warning: underquoted definition of AM_PATH_LIBGUPPI 
    */usr/share/aclocal/libglade.m4:7: warning: underquoted definition of AM_PATH_LIBGLADE 
    */usr/share/aclocal/libart.m4:11: warning: underquoted definition of AM_PATH_LIBART 
    */usr/share/aclocal/libIDL.m4:6: warning: underquoted definition of AM_PATH_LIBIDL 
    */usr/share/aclocal/imlib.m4:9: warning: underquoted definition of AM_PATH_IMLIB 
    */usr/share/aclocal/imlib.m4:167: warning: underquoted definition of AM_PATH_GDK_IMLIB 
    */usr/share/aclocal/gtk.m4:7: warning: underquoted definition of AM_PATH_GTK 
    */usr/share/aclocal/glib.m4:8: warning: underquoted definition of AM_PATH_GLIB 
    */usr/share/aclocal/gdk-pixbuf.m4:12: warning: underquoted definition of AM_PATH_GDK_PIXBUF 
    */usr/share/aclocal/gconf-2.m4:8: warning: underquoted definition of AM_GCONF_SOURCE_2 
    */usr/share/aclocal/gconf-1.m4:4: warning: underquoted definition of AM_PATH_GCONF 
    */usr/share/aclocal/gconf-1.m4:71: warning: underquoted definition of AM_GCONF_SOURCE 
    */usr/share/aclocal/audiofile.m4:12: warning: underquoted definition of AM_PATH_AUDIOFILE 
    */usr/share/aclocal/ORBit.m4:4: warning: underquoted definition of AM_PATH_ORBIT 
    *installing -c 
    *compiling yes (gcc) 
    *compiling yes (g++) 
    *compiling fi (g++) 
    */usr/include/c++/3.3.3/backward/backward_warning.h&#58;32&#58;2&#58; warning&#58; #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated. 
    *compiling fi &#40;g++&#41; 
    */usr/include/c++/3.3.3/backward/backward_warning.h&#58;32&#58;2&#58; warning&#58; #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated. 
    *linking audiotesting &#40;libtool&#41; 
    *linking audiotesting &#40;g++&#41;
    Then i select Debug>Start, i get this error:
    /root/audiotesting/debug/src/audiotesting: No such file or directory.

    I opened a shell, Cd to /audiotesting/debug/src and there is a Makefile, so i run ĻmakeĻ
    the output is:
    Code:
    /bin/sh ../libtool --mode=link g++  -O0 -g3   -o audiotesting   audiotesting.o mediasession.o -l/usr/local/lib/libjrtp.so-2.9
    g++ -O0 -g3 -o audiotesting audiotesting.o mediasession.o  -l/usr/local/lib/libjrtp.so-2.9
    /usr/bin/ld&#58; cannot find -l/usr/local/lib/libjrtp.so-2.9
    collect2&#58; ld returned 1 exit status
    make&#58; *** &#91;audiotesting&#93; Error 1
    Why canīt the loader find libjrtp.so-2.9? it is there, i made sure of that! Where did i go wrong?

  2. #2
    Just Joined!
    Join Date
    Jul 2004
    Location
    Finland
    Posts
    17

    what is going on??!

    first, let me say, g++ gives the same thing:

    Code:
    g++ audiotesting.cpp mediasession.cpp -I/usr/local/include/jrtplib -o test -Wno-deprecated -l/usr/local/lib/libjrtp -lg++
    /usr/bin/ld&#58; cannot find -l/usr/local/lib/libjrtp
    collect2&#58; ld returned 1 exit status
    but when i removed the -l (small L, as in letter) , it worked just fine!!!
    Code:
    g++ audiotesting.cpp mediasession.cpp /usr/local/lib/libjrtp.a -I/usr/local/include/jrtplib -o test -Wno-deprecated
    I went back to KDevelop, and removed -l and it worked just fine!!!

    Now why did that happened? according to g++ manual, -l must be there...does anyone have any idea? please help me not creating this bad image about linux

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •