Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!uunet!munnari.oz.au!manuel!ccadfa!prolix!dac From: dac@prolix.pub.uu.oz.au (Andrew Clayton) Newsgroups: comp.sys.amiga.programmer Subject: Comeau C++ - minor hassles Message-ID: <196141bc.ARN2287@prolix.pub.uu.oz.au> Date: 29 Jun 91 20:57:00 GMT Reply-To: munnari!labtam!eyrie!prolix!dac Followup-To: comp.sys.amiga.programmer Organization: More like Mis~, really. Lines: 73 A while ago I saw Greg Comeau around the traps, answering questions about C++. Since I use Glockenspiel C++ at work, I thought that having a C++ compiler at home, for my Amiga, would be a good thing, so I sent off my sheckels to Comeau Computing, and recieved 'Comeau Computing C++ Version 2.1' On installing it, I tried to run it, and couldn't get the environment to work until I messed around with the COMO Rexx routine. I'm looking to do two things here - find out if I've been a goose, and done something catastrophically stoopid, and also tell others how to circumvent the problems I encountered during the setup of the C++ environment. Two major problems that affected me [and I must stress, I may be doing something wrong here! It's just not clear to me how it could work otherwise], were as follows. 1. The calls to LC1 and didn't work, no matter what I did. When I put an 'Address Command' in the Rexx script, before the offending line, then that problem departed. Minor quibble - the script claims that it leaves FILENAME.P alone, when it really means to say 'f.p' (QUAD:cctest.p) 2. The call to Cfront bombed out with "unknown '>'". This was from the REXX script line that reads; 'CC21c:cfront < ' f.p CfrontOpts ' +f'|| f.cp ' > ' f.c Or, in Amigados terms CC21c:cfront < filename.p +L +f filename.cp > filename.c The problem being that the command is trying to redirect output to 'filename.c' in order to further compile that with SAS/C. Now, as we all know, *standard* Amigados redirection *must* appear before any other command line parameters, so I had to fix the line to read; 'CC21c:cfront < ' f.p ' > ' f.c CfrontOpts ' +f'|| f.cp Which is really CC21c:cfront < filename.p > filename.c +L +f filename.cp And that works perfectly. My surmisation is that the developers of Comeau C++ for the Amiga are using something other than Amigashell for their command environment - something like WSHELL. I don't OWN WSHELL, and the documentation you get with C++ certainly doesn't make ANY mention of a requirement of having WSHELL or some other environment in order for C++ to function - only Arexx, which I have. Adittionally, I think it's unreasonable that a program should require 100000 bytes for a stack! One last gripe - whilst the CCtest2.cp program (with cout << 'hello world') worked great (even though it was 26K long!), the pure C version (printf("Hello World\n")) doesn't LINK when run through the COMO script. I'm using SAS/C 5.10a [also just installed, so I'ma complete neophyte], but this should be the environment that Comeau is certified for. Anyone any idea what I've been doing wrong? Dac --