[Prev][Next][Index]

Re: pc++ bug on sun4 / iris4d



> > A quick "fix" is to use C style I/O for now (printf,...). I know
> > that this is not verry satisfying for a real C++ programmer,
> > but at least it works.
> 
> First of all, thanks very much for your prompt help. I tried your
> suggestion imeediately (changed all cout to printf, and comment out the
> #include <iostream.h>), again it compiles and runs with g++, but not
> with pc++. The error is different though:

I compiled your program on my machine (Solaris 2.5), and I also get a
compile error but on "stdlib.h". As this include is the last line
before the "class" line, I suspect it is also your problem.

When I removed the "#include <stdlib.h>" line, it worked and produced
a *.C file. However I cannot compile this program with CC as it has
pC++ specific definitions in it. In order to get this to work, you need to
do the following (which is perhaps not what you want to do, but I don't
know what you indent to do):

- put your source file in a file with the extension .pc

- create a file SOURCE which just contains the basename of your
  source file without the extension .pc

- "#include "pcxx.h" at the top of your program. pcxx.h includes
  for you stdio.h, stdlib.h, math.h, and string.h, but in a way
  that is supposed to work :-) It also takes care of the WCHAR_T
  problem.

- rename "main" to "Processor_Main" (the pC++ main function)

- then type "build uniproc" which executes pc++, your C++ compiler
  and linker with the right include paths and libraries to
  generate a executable "uniproc" (suitable to run on a uniprocessor)
  
It still does not link, as your program doesn't have a pC++
collection in it :-)

I am not sure, but I suspect you have version 1.7 from the offical sage ftp
site.  Another thing you might want to try is to get the latest (internal)
version of sage/pc++. Contact Pete Beckman (beckman@extreme.indiana.edu)
on how to get access to this version.

Bernd