Find the answer to your Linux question:
Results 1 to 5 of 5
Hi all, i have a strange problem on this compilation, if i type this command : gcc sample.c -lsybdb -o sample it compile fine without error and application works fine. ...
  1. #1
    Just Joined!
    Join Date
    Sep 2009
    Posts
    3

    Compiling problem...

    Hi all, i have a strange problem on this compilation, if i type this command :

    gcc sample.c -lsybdb -o sample

    it compile fine without error and application works fine.
    but if i compile it using this makefile :

    all: sample

    sample: sample.o
    gcc sample.c -lsysdb -o sample

    clean:
    rm -rf *o sample

    i get this error :
    /usr/bin/ld: cannot find -lsysdb
    collect2: ld returned 1 exit status

    any help?

  2. #2
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    I don't know what's going on with the setting but

    Code:
    sample: sample.o
    gcc sample.c -lsysdb -o sample
    Shouldn't this be

    Code:
    sample: sample.c
    gcc sample.c -lsysdb -o sample
    Make mine Arch Linux

  3. #3
    Just Joined!
    Join Date
    Sep 2009
    Posts
    3
    Quote Originally Posted by gerard4143 View Post
    I don't know what's going on with the setting but

    Code:
    sample: sample.o
    gcc sample.c -lsysdb -o sample
    Shouldn't this be

    Code:
    sample: sample.c
    gcc sample.c -lsysdb -o sample
    i get the same resuts ... here more details :

    attempt to open /usr/lib/libsysdb.so failed
    attempt to open /usr/lib/libsysdb.a failed
    /usr/bin/ld: cannot find -lsysdb
    collect2: ld returned 1 exit status
    make: *** [sample] Errore 1
    root@linux:/2#

  4. #4
    Just Joined! djap's Avatar
    Join Date
    Jul 2005
    Location
    Not so sure anymore...
    Posts
    97
    looks like typo to me

    in command line you have
    -lsybdb and
    -lsysdb
    in makefile

  5. #5
    Just Joined!
    Join Date
    Sep 2009
    Posts
    3
    Quote Originally Posted by djap View Post
    looks like typo to me

    in command line you have
    -lsybdb and
    -lsysdb
    in makefile
    Ohh man !!!
    you're right and i'm an idiot !!!!!!!!!!!!!

    thank you !!

Posting Permissions

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