dac@prolix.pub.uu.oz.au (Andrew Clayton) (06/30/91)
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
--bojsen@moria.UUCP (Per Bojsen) (06/30/91)
In article <196141bc.ARN2287@prolix.pub.uu.oz.au>, Andrew Clayton writes: > 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. > This happened for me, too. > 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. > Yes, I came to the same conclusion. I surmise that WShell will execute Rexx scripts implicitly (and strip off the .rexx suffix), that Rexx scripts executed from WShell don't need the `ADDRESS COMMAND' line, and that WShell allows redirection clauses to occur anywhere on the command line (maybe the 2.0 AmigaShell allows that too ;-)). > 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 had no such problem. Might be a SAS/C setup/installation problem (?). BTW: Did you see my post on a *major* Comeau C++/Lattice C++/cfront problem? Just try doing a two module program, which includes iostream.h in both modules! -- .------------------------------------------------------------------------------. | Greetings from Per Bojsen. | +------------------------------+-----------------------------------------------+ | EMail: cbmehq!lenler!bojsen | "Names do have power, after all, that of | | Or: bojsen@dc.dth.dk | conjuring images of places we have not seen" | `------------------------------+-----------------------------------------------'