Results 1 to 2 of 2

Thread: linking !!?? ubuntu linux .so

  1. #1
    Join Date
    May 2007

    linking !!?? ubuntu linux .so

    in my examples i can see the <iostream> tag
    how can i know where all header files , tags are located
    in the .so files.


    I am using wx/wx.h, sqlite3.h, stdlib.h, stdio.h header files and
    I cannot link after compiling because i don't know the .so files
    that this headers belong to.
    gcc -c <mySource> works fine but gcc <mySource> doesn't

    where can i find a guide for compiling / linking and .so index
    and connect the headers to .so's

  2. #2
    Join Date
    Apr 2007
    Kubuntu 7.04 Feisty Fawn

    Re: linking !!?? ubuntu linux .so

    You need to refer to the docs and manpages of the softwares you're using unfortunately. For standard library headers, they're automatically linked, otherwise you need to specify the library when linking. For example, if I was to use the pthread library (pthread.h and /usr/lib/, the command is:
    gcc -lpthread -o myprog the_source.c
    Most libraries are in some similar format, eg boost_thread is lboost_thread, presumably wx/wx.h would be something like -lwx.

    If you want to see which libraries a program has loaded, run
    ldd <command>
    For example
    [bunker@sword] $ ldd /bin/ls
   =>  (0xffffe000)
   => /lib/i686/cmov/ (0xb7fcb000)
   => /lib/ (0xb7fc4000)
   => /lib/ (0xb7fae000)
   => /lib/i686/cmov/ (0xb7e66000)
   => /lib/i686/cmov/ (0xb7e4f000)
            /lib/ (0xb7fe3000)
   => /lib/ (0xb7e4b000)
   => /lib/i686/cmov/ (0xb7e46000)
   => /lib/ (0xb7e05000)
    Last edited by bunker; November 9th, 2007 at 12:36 PM.


Posting Permissions

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