Ive installed gcc and it almost works, but constructors and destructors for global objects and objects at file scope aren being called. What did I do wrong?
It appears that you are running on a platform that requires you to install either “collect2” or the GNU linker, and you have done neither. For more information, see the section discussing the GNU linker (See section Should I use the GNU linker, or should I use “collect”?). On Solaris 2.x, you shouldn’t need a collect program and GNU ld doesn’t run. If your global constructors aren’t being called, you may need to install a patch, available from Sun, to fix your linker. The number of the “jumbo patch” that applies is 101409-03. Thanks to Russell Street (r.street@auckland.ac.nz) for this info.