Received: from PACIFIC-CARRIER-ANNEX.MIT.EDU by po7.MIT.EDU (5.61/4.7) id AA19813; Fri, 8 Mar 96 06:12:34 EST
Received: from PO9.MIT.EDU by MIT.EDU with SMTP
	id AA01701; Fri, 8 Mar 96 06:11:53 EST
Received: from ISLANDER.MIT.EDU by po9.MIT.EDU (5.61/4.7) id AA00768; Fri, 8 Mar 96 06:11:53 EST
Received: by ISLANDER.MIT.EDU with Microsoft Mail
	id <01BB0CB6.3C906DA0@ISLANDER.MIT.EDU>; Fri, 8 Mar 1996 06:12:32 -0500
Message-Id: <01BB0CB6.3C906DA0@ISLANDER.MIT.EDU>
From: Steve Niemczyk <sniemczy@MIT.EDU>
To: "'proven@mit.edu'" <proven@MIT.EDU>
Subject: SunOS 4.1.3 and libg++
Date: Fri, 8 Mar 1996 06:12:30 -0500
Encoding: 49 TEXT

hi.  Me again :-)  I finally got access to the 4.1.3 machine that I was 
promised, and I build gcc, pthreads, libg++, gmake, etc. on it 
successfully.

I was able to run simple "helloworld.cxx" style programs using gcc (no 
iostream classes) g++ (with iostream classes), yet unusual behavior with 
the pg++ classes.

It turns out that whether I build libg++ ENTIRELY from pgcc (aka, I never 
installed libg++ until after I installed pthreads, and with the "CC=pgcc 
-O2" and "CXX=pgcc" options turned on) or if I make a normal libg++ in 
/usr/local/ and put a special version of libg++ somewhere, it still 
core-dumps...

I can get the code to compile if I use the standard libg++ libraries, 
compiled without pgcc, but the code does nothing, or Seg faults :-(

Here is the program:

#include <stdio.h>
#include <pthread.h>
#include <iostream.h>

void main()
{
        printf("Hello World\n");
        cout << "Hi Mom!" << endl;
        cout << "Enter a number:";
        int x = 5;
        cin >> x;
        cout << "Wow!  You chose " << x << '!' << endl;
}

here is the output:

sunny <~/testc++>: a.out
Hello World
Segmentation fault (core dumped)

Any ideas?

                               -Steve Niemczyk

---------------------------------------------------------------------
Steve Niemczyk      \ \  "Chasing rainbows  \ \  http://isles.mit.edu
362 Memorial Dr.     \ \   is the only way   \ \  sniemczy@mit.edu
Cambridge, MA 02139   \ \   to get the pots   \ \  S.B./M.Eng MIT '96
Rm 625  (617)225-7375  \ \   of gold..."       \ \  Comp Sci. / E.E.
---------------------------------------------------------------------

