This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Linking gcc 3.2 c++-library to a gcc 2.7 c-executable
- From: Phil Edwards <phil at jaj dot com>
- To: Kerola Antti <antti dot kerola at insta dot fi>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 19 Dec 2002 00:51:44 -0500
- Subject: Re: Linking gcc 3.2 c++-library to a gcc 2.7 c-executable
- References: <51833CF52D4ED211A6DA00A0C9A2BE64CCE342@mail.insta.fi>
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 2.7.2.2.
>
> Is it possible to do the linking of the executable and the c++
> -library with gcc 2.7.2.2?
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