From mboxrd@z Thu Jan 1 00:00:00 1970 From: Herve Dutter To: help-gcc@gnu.org Subject: Re: Segmentation Fault(coredump) with g++ on SunOS 5.6 Date: Sat, 01 Apr 2000 00:00:00 -0000 Message-ID: <38720F1D.6BE4C18D@nospam.com> References: <83e59f$8g9$1@nnrp1.deja.com> X-SW-Source: 2000-q1/msg00039.html Message-ID: <20000401000000.LzKFucosQaYUibsb0uxPxfClCxm7_s61uoM6uvEa4OM@z> The problem comes from an incompatibility between the iostreams libraries. The SunWspro compiler used on SunOS 5.6 has a new - so called strandard - implementation of the iostreams in a static library named libCstd.a. The problem is that this implementation of the iostreams is totally incompatible with the good old libiostreams.a used by everyone else, including the g++ compiler. If you compile a cout << "hello" code with g++ this will work until you link the executable with a shared object library that was generated with SunWspro and uses the new "Cstd" iostreams. In that case, your executable will coredump even before reaching your main entry point. If you can identify the shared object that causes the problem, you may be able to get it re-generated either with g++ or with the "-libraries=iostreams,no%Cstd" option for the SunWspro compiler. Other possible solutions are: - exclusive use of SunWspro on solaris, - triple memory size and link everything static, - throw Solaris to the bin and go Linux. I still have to make my own choice as I have the same problem and the shared object is a third party... jimjackson@sungardebs.com wrote: > > Simple cout << "hello" type program fails with Segmentation Fault > (coredump). compiling with -static causes program to work properly. > Any ideas anyone? > > Sent via Deja.com http://www.deja.com/ > Before you buy.