This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Linking gcc compiled binaries and non-gcc libraries
- From: "Vardhan, Sundara (GE Infra, Energy)" <sundara dot vardhan at ge dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Thu, 29 Jan 2009 09:14:32 -0500
- Subject: Linking gcc compiled binaries and non-gcc libraries
Hi All
I have a situation wherein I have compiled all my application using gcc
on a solaris 10 and AIX. I have compiled most of the required 3rd party
software with gcc and linked them to the application. However, I have
one which has been compiled using native Sun and AIX compilers for which
I do not have source file access, which needs to be linked.
I was able to link it successfully when I added the native system C++
library path to its link flags : /usr/lib/libC.a for AIX and
/usr/lib/libCstd.a for Solaris.
However, when the binary created by this is run, it dumps core and I
believe, it does so by jumping to address zero, possibly because of a
function pointer that did not get defined. Something like that could
happen if the core GNU supporting logic in our test program does not
know how to locate and run (as an example) C++ constructors in the
native-built API.
Is there any way I can be able to bridge these two sets successfully? I
would very much appreciate your help and input.
With Regards
Vardhan