This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
__attribute__((constructor))
- To: gcc-help at gcc dot gnu dot org
- Subject: __attribute__((constructor))
- From: John Levon <moz at compsoc dot man dot ac dot uk>
- Date: Tue, 26 Jun 2001 02:29:28 +0100
Is attribute constructor/destructor supposed to work for libraries (particularly
a static .a library) ? My functions never get called.
The platform is linux glibc 2.1.92 (rh 7.0), gcc 3.0.
If it's not supposed to work, is there any other way to get init/cleanup routines
for a library and avoid either a library_init() required in program code, or
lazy initialisation (initialise on first API call) ?
thanks
john
--
"Euler's equation contains the five most important numbers in mathematics."