LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-28-2003, 10:01 PM   #1
raven
Member
 
Registered: Dec 2001
Location: Basel, Switzerland
Distribution: ubuntu
Posts: 297

Rep: Reputation: 31
question about symbols


hello

I am having problems compiling some programs with gcc 3. The problem is, when gcc should be linking the libs, I get unresolved symbol error(s). I took a look at the libs where I found out the symbold are with "nm" and saw, that the symbols needed by the compiler are marked "undefined".

Hows that? What can I do to prevent such stuff? How can I change such symbols to something else?

Any help is appreciated.

Thanks

raven
 
Old 12-29-2003, 06:11 AM   #2
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 36
If a symbol exists in a library and it is undefined, it means the library calls
the symbol as an extern symbol.

Change the order of the object files and libraries in the command, make sure that the standard libraries like /usr/lib/libc are last. The linker cannot resolve a new symbol in a .o file that is in a library earlier in the list than where the .o file is.
 
  


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
Short question on GLIBC symbols BedriddenTech Linux - Software 0 01-23-2005 10:00 AM
Unresolved symbols Chris McGee Slackware 3 12-28-2004 08:22 AM
New symbols for keyboard fiomba Linux - Software 4 10-22-2004 08:36 AM
Unresolved symbols dimi Linux - General 3 12-08-2003 03:34 PM
exported symbols??? raven Linux - Software 1 06-27-2002 06:10 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

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