-output-def, -soname using gcc

E

Ernesto

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?

Best regards



Ernesto
 
V

Victor Bazarov

Ernesto said:
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?

You're posting to a wrong newsgroup. You need gnu.g++.help. If
that doesn't do, try comp.os.linux.development.* hierarchy.

Victor
 
J

John Harrison

Ernesto said:
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?

Well your compile is failing so I don't see how you could think you are
right. What you are doing wrong is thinking that all compilers operate in
the same way. You should read the documentation on g++ and find out how to
use it.

john
 
E

Ernesto

John Harrison said:
Well your compile is failing so I don't see how you could think you are
right. What you are doing wrong is thinking that all compilers operate in
the same way. You should read the documentation on g++ and find out how to
use it.

john

Hi john:

mingw is just a gcc port to windows that implements a set of header
files in order to access to the win32api, but the compiler options are
the same because the c++ toolchain is the same as unix gcc.

Regards



ernesto
 
O

Owen Jacobson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,176
Messages
2,570,950
Members
47,503
Latest member
supremedee

Latest Threads

Top