Linking gcc 3.2 c++-library to a gcc 2.7 c-executable

Phil Edwards
Wed Dec 18 23:17:00 GMT 2002

On Mon, Dec 16, 2002 at 06:33:51PM +0200, Kerola Antti wrote:
> I have a c++-library implemented by another party which 
> uses STL and will only compile with gcc 3.x. The library
> provides also a C interface with extern "C" -functions.
> I need to link this library to a main program, which
> is written in C and currently compiles with gcc
> Is it possible to do the linking of the executable and the c++
> -library with gcc 

Very doubtful IMHO.  At minimum you would probably need to compile the
file containing main() as C++, not C, so that setup of statics is done by
the 2.x compiler.

I would therefore like to posit that computing's central challenge, viz. "How
not to make a mess of it," has /not/ been met.
                                                 - Edsger Dijkstra, 1930-2002

More information about the Gcc mailing list