Article View: gnu.g++.help
Article #825Re: gnu ld not finding symbols
From: Rohan LENARD
Date: Sun, 19 Nov 1995 21:11
Date: Sun, 19 Nov 1995 21:11
34 lines
1876 bytes
1876 bytes
In article <9511171758.AA14183@vital>, Albert Golembiowski <albert@inrs-telecom.uquebec.ca> wrote: >Hello Experts, > >Are there any legitimate circumstance under which `ld' >flags symbols (function names) as `undefined' even though >they exist in an archive symbol table, as assured by command `nm -s', >and the archive is listed downstream from where the >`undefined' originate. > >I'd think that `ld' simply looks up the symbol table to decide on >undefined. This is certainly legitimate. The way all linkers work is given an object file, make a list of undefined symbols. Once all object files are done, then start looking at libraries. For each library in order if any files in the library remove an undefined symbol then include the file - this obviously change the undefined list. However, once a file has been looked at once it is not looked at again - so if libA.a defined something and libB.a needs it and libA.a is listed before libB.a in the included libraries it will never link. Probably I've now confused you. Sorry :-(. Library structure, and order at linking is very important if you want to get your code to compile and link. Regards, Rohan -- ---------------------------------------------------------------------------- rjl@iassf.easams.com.au | All quotes can be attributed to my automated quote Rohan Lenard | writing tool. Yours for just $19.95; and if you +61-2-367-4555 | call now you'll get a free set of steak knives ...
Technical Details
Message-ID:
<48o6if$fp8@f111.iassf.easams.com.au>Path:
arc1-ca.pugleaf.net!iassf.easams.com.au!not-for-mailReferences:
<9511171758.AA14183@vital>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!iassf.easams.com.au!not-for-mail From: rjl@f111.iassf.easams.com.au (Rohan LENARD) Newsgroups: gnu.g++.help,comp.lang.c++ Subject: Re: gnu ld not finding symbols Date: 20 Nov 1995 08:11:43 +1100 Organization: EASAMS (Australia) Pty Ltd Message-ID: <48o6if$fp8@f111.iassf.easams.com.au> References: <9511171758.AA14183@vital> NNTP-Posting-Host: f111