This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
C clients calling into C++ libraries (startup/shutdown code issues)
- To: gcc at gcc dot gnu dot org
- Subject: C clients calling into C++ libraries (startup/shutdown code issues)
- From: Paul Duffy <paduffy at cisco dot com>
- Date: Tue, 15 Aug 2000 15:18:32 -0400
I'm developing a C++ object based shared library that presents an extern
"C" API to various C clients. I wrestling with startup issues involving
C++ libraries called from C.
With the client main() authored and compiled in C, I'm assuming that the C,
not the C++, startup and shutdown code is called before/after transfer to
main() ?
How do I force the C++ startup/shutdown code execution for the C++ shared
library (to execute constructors on global objects, etc) ?
Also, is there a complete description somewhere of the activities performed
by the C and C++ startup and shutdown code ?
Cheers,
*********************************************************
Paul B Duffy 978-244-4754 Fax 978-244-8917
Cisco Systems, Inc. paduffy@cisco.com
300 Apollo Drive
Chelmsford, MA 01824
*********************************************************