Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 07-24-2003, 01:23 PM   #1
Registered: Jul 2003
Distribution: Arch Linux x64
Posts: 115

Rep: Reputation: 15
Help Linking Library!! Please!!

Hi mates! I have a problem linking a my code when I use g++. The problem is that I can't make g++ to find the library where a function I need is. I 've found two ways of compiling successfully in my university but they fail misserably in my laptop. There are:

'g++ -L./scope-src/ -o anything LBPROT.cpp -lscope' (Suggested by rch. Many thanks mate!! )


'g++ LBPROT.cpp ./scope-src/libscope.a -o LBPROT'

The g++ version I use is fine as you can see below:

At home:
[bash$] g++ --version
g++ (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

In my university:
bash-2.04$ g++ --version

The error I always get is:

/tmp/ccYYTJfA.o(.text+0x27): In function `getimagef(char*, image_data*)':
: reference to `getimage(data*, char*, char*)' non-defined
collect2: ld returned the output state 1

Any suggestion will be really welcome. Do you have any???

Thanks to all for you help!!
Old 07-24-2003, 03:16 PM   #2
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
From what you posted it's not quite clear
whether there's actually two functions (same
name, varied parameters) present or not.

If there aren't you can safely assume that
the error lies in the compiler at the uni ;)
and it SHOULD fail, too.


P.S.: Really this one belongs in the
programming forum :}


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Still library linking problem The_Nerd Programming 19 05-20-2004 04:08 PM
Library linking problem The_Nerd Programming 10 04-26-2004 11:07 PM
library linking question. shaggz Linux - General 1 04-25-2004 11:22 PM
linking own library bobby2k3 Programming 2 10-20-2003 10:36 AM
linking library simonissa Linux - Software 2 05-21-2003 09:41 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:03 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration