This is the mail archive of the gcc-help@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]

__attribute__((constructor))



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."


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