This is the mail archive of the
mailing list for the GCC project.
Re: compiling g++ 3.2.3
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Tan-Long Phan <longp at cae dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 21 Jun 2004 15:10:12 -0400
- Subject: Re: compiling g++ 3.2.3
- References: <719A38AB7279D511B91900D0B7444A9E0FAF70AB@caemsx03.cae.ca>
>>>>> Tan-Long Phan writes:
Phan> I'm compiling c++ code under AIX 4.3, I would like to link dynamic library
Phan> (.so) with another one (.so). What linker option should I use to link
Phan> differents (extension .so) libraries together? if I put -l option followed
Phan> by the library name it would link statically.
I am a little confused by your description. You are trying to
create a shared library on AIX that depends on another shared library?
Adding the dependent shared library on the link line creating the new
shared library should work. What do you mean by "it would link
statically"? Adding the library to the link line will not include the
code from the old library in the new one.
Are you sure that the libraries you created are shared objects?
AIX shared objects normally have file extension ".a", not ".so", and
normally are an *ARCHIVE* of shared objects, not a bare shared object, but
AIX will deal with either. AIX ignores shared libraries with ".so"
extension unless the AIX linker -G (to create) / -brtl (to use) options
are used. If you are forcing the AIX linker to use the files with the
incorrect file extensions, the linker may be using different files than
you expect or you may be invoking different linker semantics than you