LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 04-04-2003, 06:28 AM   #1
faulpelz2
LQ Newbie
 
Registered: Mar 2003
Distribution: Debian
Posts: 4

Rep: Reputation: 0
Yet another 'undefined reference' problem


Hi,

in short, I have the feeling my linker does not look at lib*.a libraries.
This is the problem:
#g++-3.2 -lGL -lGLU -lglut -L../Meshlib/Lib -lmesh main.o load.o glnav.o glnavapp.o waypoints.o fonts.o
glnavapp.o: In function `GlNavApp::debug(int)':
glnavapp.o(.text+0x1d00): undefined reference to `getFrustumGL(t_3DVector&, t_3DVector&, t_3DVector&, t_3DVector&, t_3DVector&, t_3DVector&)'

The function 'getFrustumGL' is located in the file support-opengl.o, which in turn is located in the library libmesh.a. When I take the -Lpath option out, the linker complains (of course) about not finding the library libmesh.a. When I link the program with support-opengl.o (which I have present beside the library), no error comes up.
That leads me to the assumption that the linker does not search the library correctly. Beside, the GL library only exists as libGL.so, not as static libGL.a. Does that mean the linker only tries to link to shared libraries?

Does anybody have an idea?

Björn

P.S.: g++ 3.2.1 gcc 3.2.1
The library is compiled with the same version.
ar 2.13.90.0.18
Debian 3.0 testing/unstable, because I need glibc 2.3 for libmesh.a
 
Old 04-04-2003, 09:33 AM   #2
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
could this be the result of installing libraries and not running 'ldconfig' afterward?
 
Old 04-04-2003, 10:50 AM   #3
faulpelz2
LQ Newbie
 
Registered: Mar 2003
Distribution: Debian
Posts: 4

Original Poster
Rep: Reputation: 0
No, I don't think so. ldconfig is for dynamic libraries, and furthermore just accessible as root. In my case, I have the static library libmesh.a, which is not installed in a system path (that's why I supply the exact path with the -L option), and I don't want it to be in a system path. It's just intended for the same user who compiles the program.
 
Old 04-04-2003, 11:18 AM   #4
jpbarto
Senior Member
 
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251

Rep: Reputation: 45
I'm sorry then... I'm afraid I don't have too much experience with trouble shooting libraries...
 
  


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
problem of undefined reference to `__ctype_b' nelnel Programming 3 08-01-2007 01:40 AM
Undefined Reference ChemicalBurn Programming 2 02-14-2005 03:01 AM
undefined reference mp4-10 Programming 3 01-25-2005 12:38 PM
Glib-1.020 install problem Can't use an undefined value as a symbol reference jimdaworm Linux - Software 1 01-03-2004 05:32 AM
2.6-test9 compile problem - undefined reference to `ide_hwifs' saint Linux - General 5 11-20-2003 04:53 PM

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

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