I'm building a shared library which has some global objects. I'm
building these with g++ 4.1.1 on an AIX 5.3. This was working alright
with the the constructors of the global objects being called
correctly. I recently made a change in the build script to use the
gcc -pthread option since I was planning on adding some threading to
the shared library (no code changes made yet). However with this
build file change however, none of the constructors for the global
objects are getting called. Remove this and it works again.
I'm at a loss trying to understand whats going on and stuck. I've gone
thru
http://www.ibm.com/developerworks/ai...ry/au-gnu.html and
doing pretty much what it suggests. I've also tried explicitly using
the AIX's linker's option to specify _GLOBAL__DT as the init routine
also - but that does not help either.
Any pointers will be much appreciated.