This is the mail archive of the
mailing list for the GCC project.
Re: C++ code with external C API --> static library?
- From: llewelly at xmission dot com
- To: Ingolf Steinbach <Ingolf dot Steinbach at jena-optronik dot de>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 11 Jun 2004 10:50:18 -0600
- Subject: Re: C++ code with external C API --> static library?
- References: <email@example.com>
Ingolf Steinbach <Ingolf.Steinbach@jena-optronik.de> writes:
> what are the necessary steps with gcc/g++ to solve the following
> 1. Target is a static library
> 2. The library presents a C language API
> 3. Internally, the library is implemented in C++ and makes
> heavy use of standard components from the stdc++ library
> 4. A user shall be able to use the library with gcc without
> having to know that the library is implemented in C++
> (i.e. the library must not reference unresolved C++ related
> symbols; all these symbols have to be resolved when the
> library is created).
For this, you'll need to link libstdc++ and libsupc++ to the library
> 5. Only symbols from the C language API are to be exported
> by the library. No internal symbols shall be visible.