LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 07-24-2003, 02:23 PM   #1
Musikolo
Member
 
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!! )

and

'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
2.96


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, 04:16 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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.

Cheers,
Tink

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


Reply


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 05:08 PM
Library linking problem The_Nerd Programming 10 04-27-2004 12:07 AM
library linking question. shaggz Linux - General 1 04-26-2004 12:22 AM
linking own library bobby2k3 Programming 2 10-20-2003 11:36 AM
linking library simonissa Linux - Software 2 05-21-2003 10:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:22 PM.

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