LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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-27-2003, 07:25 AM   #1
raven
Member
 
Registered: Dec 2001
Location: Basel, Switzerland
Distribution: ubuntu
Posts: 297

Rep: Reputation: 31
link error???


hello

I am trying to compile the vorbis tools on my darwin7.2 system. Making of libao, libvorbis and libogg went fine, with no compile errors at all.

but when I try to compile vorbis tools I get an unresolved symbol error:

ld: undefined symbols:
_dlsym_auto_underscore

and make dies. the funny thing is, I found where this symbol should be (somewhere in libao.a if I saw right) and the library is specified on the command line which is supposed to link the binaries. it looks somewhat like this:

gcc -fno-common -O4 ....... -lm -logg -vorbis -lao -lpthread ... and so on....

I also seem to have other link problems with ncurses for example... very strange. My problem is, that i have a linker on the system (called "ld") but it seems not to link what it should... on the other hand, as I mentioned, 3 other packages already compiled and linked with o problems at all...

my question: how to make gcc to link the binaries with no errors (because the symbol should be there somewhere) or how to do something what "ldconfig" on linux systems does? Cos I have no ldconfig. could anyone tell me what package I need to look for to get "gnu ld" (the one which comes with ldconfig)? Or what else should I do?

Thanks

raven
 
Old 12-28-2003, 01:05 AM   #2
infamous41md
Member
 
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
when all else fails(trying to pass gcc linker options, man gcc) i sometimes have to do this:
'cd /usr/path/to/shared/libs'
'grep name_of_symbol_here *'

this will spit out all the files that contain that symbol. then you can just pass the shared library file to gcc directly:
'gcc source.c lib_your_library.so'
and ld will resolve the symbols correctly.
 
Old 12-28-2003, 08:24 AM   #3
raven
Member
 
Registered: Dec 2001
Location: Basel, Switzerland
Distribution: ubuntu
Posts: 297

Original Poster
Rep: Reputation: 31
thanks, but i already tryed this. it still doesnt compile...

thats the joke of all this: the libs ARE defined on the gcc command line, and still... no use

any other idea?

raven
 
  


Reply



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
HCL link error Artanicus LQ Suggestions & Feedback 13 09-14-2005 07:36 AM
libtool link error tibbar66 Linux - Newbie 1 04-09-2005 05:14 PM
can link with crt1.o error. wolver Linux From Scratch 0 01-16-2005 09:02 AM
Link error KevinG Programming 1 12-01-2004 11:35 PM
libclntsh.so.9.0 link error srramkumar Linux - Software 1 10-02-2003 02:37 AM

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

All times are GMT -5. The time now is 09:58 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