Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!edcastle!elev26 From: elev26@castle.ed.ac.uk (Gerard A. Allan) Newsgroups: comp.lang.c++ Subject: ET++ and g++ Message-ID: <7321@castle.ed.ac.uk> Date: 26 Nov 90 12:08:49 GMT Sender: elev26@castle.ed.ac.uk Organization: Edinburgh Microfabrication Facility Lines: 79 I have compiled et++2.0 on a sun3 4.0 using g++1.37.1 after a little effort. There are still a number of problems. I had to solve the following problems to get Et++ up and running applications. They maybe of interest to anyone else attempting a port to g++. Applyed the patches posted by Ron Guilmette (comp.lang.c++) used makefile from tom@tnosoes.izf.tno.nl (Tom Vijlbrief) (comp.lang.c++) compiled without POSTSCRIPT PIC PICT XSERVER NEWS SERVER I applied the following script to all *.C files. A few #pragma vtables where errors but these were easily spotted by compiler. ******************************* for i do sed -e "s/\\$/\$,/g" < $i | awk -F, 'BEGIN{print "#ifdef __GNUG__ "} {if ($1 == "//$") { for(f=2;f<=NF-1;f++){ printf("#pragma vtable \"%s\"\n",$f) } } }END{print "#endif"}'|sed -e "s/\\$//g" > addfile cat addfile $i > newfile mv newfile $i done *********************** Compile with the +e2 option. This is supposed to reduce the resultant code size. (does it ? and does it introduce any problems ?). 1) with -g -fminimal-debug the gcc-ld++ crashed. I had to compile without debugging info then recompile files of interest with -g -fminimal-debug to get some debugging. 2) I had problems with the system valloc (seg in pw_open). I replaced the memory allocation routines with those in malloc.c from the g++ src directory. This solved the problem. this new malloc aborted in new char[1] of ostream::ostream I fixed this by adding in char *malloc(int n) if (n<=8) n=32; (YUK!!!!). obviously something is going on that needs properly sorted. 3) got seg violations in Object::ClassName. The problem here seemed to be that IsA returns 0 from Root::IsA. reconfigured without PROGENV removed this problem. (has anyone seem and/or solved this problem). 4) problem with StaticTextView::Fit called Difference (Rectangle.C) 3rd arg got trashed to 0x0 (maybe a compiler bug ????) int n= Difference(r,contentRect.Expand(Point(4,0)), Rectangle(newOrigin,newExtent)); replaced with Rectangle temp1= Rectangle(newOrigin,newExtent); // expanded by 4,0 to remove the caret too Rectangle temp2= contentRect.Expand(Point(4,0)); int n= Difference(r,temp2,temp1); solved problem. 5) seg violation in ClipBoard::~ClipBoard this was due to SafeDelete (Types.h) when defined as if(p) { delete p ; p=0} problem solved. ----- As a result I can now run a number of applications: hello twoview micky etc. I would like to get the PROGENV working. Has anyone had any success with this and how did you do it. Gerard A. Allan | Post: EMF elev26@castle.ed.ac.uk | Kings Buildings JANET:elev26@uk.ac.ed.castle | University of Edinburgh Internet:elev26%castle.ed.ac.uk@cunyvm.cuny.edu | Edinburgh EARN/BITNET:elev26%castle.ed.ac.uk@UKACRL | Scotland UUCP:elev26%castle.ed.ac.uk@ukc.uucp | EH9 3JL