Libraries and glocal constructors
Greg Galloway
gregg@eoeml.gtri.gatech.edu
Fri Apr 24 09:07:00 GMT 1998
I've written a simulation library on top of PVM in C++ which I'm compiling
with EGCS 1.0.2. The library has bindings for C, C++, FORTRAN, and Ada.
I intentionally stayed away from declaring any static global objects
which would need global constructors so that they library could be linked
with a non-C++ compiler. I am using standard library classes string,
ifstream, ofstream, and various STL containers. Any global objects are
new'd and accessed via a pointer.
Are there any global objects in the standard library which would still
require a global constructor/destructor which would not get initialized
properly when linked with a non-C++ compiler?
Is this addressed by the standard? Is it library implementation dependent?
Thanks,
Greg
--
Gregory L. Galloway
Research Scientist I
http://eoeml.gtri.gatech.edu/home/gregg/
More information about the Gcc
mailing list