nik wrote:
> Hi, 
> 
> I am having some issues building a C/ProC application on Solaris 9 (cc: Sun C 
> 5.8 2005/10/13, Oracle 9):
> 
> The project includes several components linked together with a number of 
> KERNEL (code N/A) libraries to provide the final binary.
> 
> My problem is that i get a bunch of undefined symbols in the linking stage. 
> However, i'm quite sure that the linker is informed properly of the 
> whereabouts of the libraries (using -L and -l) and the libraries seem to 
> contain the symbols that are reported as missing (verified by use of 
> nm/elfdump).
> 
> I understand that there might incompatibilities between the libraries as of 
> code addressing. I use the -xarch=v9 and -KPIC options to compile but i'm not 
> sure how the libraries where built. If there indeed were any such issues 
> wouldn't i get an ELF class related warning along with the missing symbols? 
> All libraries seem to be of uniform type anyway (elfdump -e).
> 
> Would there happen to be any suggestions as to why the linker cannot locate 
> symbols available in a successfuly linked library??? And by "successfully 
> linked" I mean that the library itself is located properly (if say i rename 
> it i obviously get the "cannot locate file message"...)
> 
> I'm at a loss... I've scanned through most of the posts... please excuse me 
> if i've missed smth. please feel free to redirect me... 

I'd suggest turning on some debugging and capturing stderr:

   % LD_OPTIONS=-Dfiles,libs,symbols,detail cc .....

"files" will display each file (full path) that ld(1) processes.
"libs" will display the search path used to locate any libraries.
"symbols" will display each symbol supplied by the input files.
"detail" will display symbol resolution - ie. what UNDEF's (symbol
references) are resolved by which definitions.

If this still dowsn't shed any light, indicate from the debugging
which symbols/files you believe are the source of the problem.


-- 
Rod

Reply via email to