Linux shared libraries - I'm confused

Daniel Truemper daniel-truemper at gmx.de
Sun Aug 19 03:01:34 PDT 2007


> I just built my library as a shared library, which is working; I'm
> getting all the so files and links. The I install the library (dsss
> install) and create a small test app that should include my library.
> When I build this app, I am getting a ld error:
> 
> /usr/bin/ld: tmTest: hidden symbol `stat' in
> /usr/lib/libc_nonshared.a(stat.oS) is referenced by DSO
> /usr/bin/ld: final link failed: Nonrepresentable section on output
> collect2: ld returned 1 exit status
Just in case someone is getting the same or a similar error and is
confused as I was.

The problem is that your library propably requires another library and
the you have to tell the linker to explicitly link the 3rd party
library in yours. Do this by adding "-L-lc" to your build flags...

cheers,
Daniel
-- 
"All work but no play makes Jack a dull boy"



More information about the Digitalmars-d mailing list