On Fri, 01 Oct 2004 16:23:46 -0700, Ernesto wrote:
Hi everybody:
I am developing a library using mingw (windows).
I created my binary files (.dll), my library file (.a) and my def file
(.def) using g++ -output-def=XXX -soname=XXX
The problem happened when I ported my library to linux and tried to
compile using g++. The .a and the .def file are missing because g++
did not recognize the -output-def=XXX and the -soname parameter and
threw an error message like this:
utput-def=XXX file not found.
Am I right or am I doing something wrong?
This is way, way, *way* off-topic here, as we discuss the language itself,
not implementations of and not the tools. Nonetheless, I suspect you
won't go away until you get what you're after, so here's the scoop:
There is no -output-def under linux. Linux shared objects (at least
ELF .so files) don't need an external file to tell the linker where in the
shared object various functions and data reside -- that information is
packed as part of the library itself. Instead, gcc is parsing
-output-def=XXX as "-o" "utput-def=XXX"; the -o option specifies the name
of an output file and the rest is the filename.
<http://en.tldp.org/HOWTO/Program-Library-HOWTO/index.html> has a lot more
information, including a discussion of the limitations ld.so imposes on
C++ use.
--
Some say the Wired doesn't have political borders like the real world,
but there are far too many nonsense-spouting anarchists or idiots who
think that pranks are a revolution.