This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

C clients calling into C++ libraries (startup/shutdown code issues)


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
*********************************************************



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]