Re: AIX 5.3: shared library built with xlc++ & client applications with gcc
kercan <kercan7478@xxxxxxxxx> writes:
I have a shared library that I am building with xlc++ for AIX 5.3
Client applicationuse this shared library - but they build their
application using the gcc/g++ tool set.
I noticed that they were having issues -- their application was
crashing because the globals constructors in the shared library
built with xlc++ was not getting called.
Is this even possible on AIX ?
Generally, object code compiled by different C++ compilers (and even
different versions of the same compiler) is not link-compatible.
You should abandon all hope of getting this to work correctly,
on AIX or anywhere else.
However, if your library exports only "plain-C" interface, and does
not use C++ runtime (no streams, no exceptions, no RTTI, etc.),
then you might be able to build it in such a way that it will be
usable by C applications, and by C++ apps built with g++.
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
.
Relevant Pages
- Re: Which PIC18 C Compiler?
... The root reason is re-entrant code makes RAM space indeterminate. ... Some compilers may need help from a keyword to identify re-entrant code - others can figure it out automatically. ... What I think Rich found strange was Chris' claim that "professional" compilers would not support recursive code at all. ... As you say, recursion is not much used in 8-bit systems - and if it is, it's probably a bad idea. ... (comp.arch.embedded) - Re: subroutines as arguments
... That would be the case where bar never ended up invoking the subroutine ... ends up invoking foo. ... Compilers are not required to catch illegal recursive calls. ... allow recursion at all. ... (comp.lang.fortran) - Re: "Too many continuation lines" error message (no solution, just comment)
... Note that Fortran also has recursion these days. ... I know of no current Fortran compilers that implement saved variables ... or common as anything other than static (well, ... In the realm of non-current compilers, memory was precious enough ... (comp.lang.fortran) - Re: "Too many continuation lines" error message (no solution, just comment)
... >>In C, which allows recursion, automatic variables must be ... Some of those might be written using the back end of C compilers. ... the source code documentation was mostly keyed to ... (in the days of impact printers where that worked). ... (comp.lang.fortran) - Re: inline recursive functions
... The inline keyword only is a recommendation for the compiler but does not change the semantics. ... I've seen C compilers that do, in fact, optimize certain tail-recursive functions to iterative ones and can subsequently inline the result. ... This optimization tactic isn't widely seen in compilers because it's too clever to pay off in practice; actual C code doesn't use tail-recursive functions often, if the inlining is critical a programmer would never rely on a compiler's ability to unfold tail recursion, and if the inlining is not critical, who cares? ... (comp.lang.c) |
|