"blah.c", line 123: error: identifier "__SCHAR_MAX__" is undefined
{ return CHAR_MAX; }
^
You will need to define these macros yourself. We should be able to provide you help with getting those definitions defined.
"/usr/include/_G_config.h", line 50: error: type containing an unknown-size
array is not allowed
struct __gconv_info __cd;
^
For instance, a vanilla RedHat 7.3 installed straight out of the box will run into this problem.
To rectify that, you will need to mkdir a sys directory "under" the include directory of your Comeau C++ installation. So let's say Comeau C++ is installed at /como433, then you would mkdir /como433/include/sys. Then you would create a file named /como433/include/sys/cdefs.h (your path name may be different depending upon where you installed Comeau C++), as follows:
#ifndef _COMO_SYS_CDEFS_H #define _COMO_SYS_CDEFS_H 1 /* Change this path if your C compiler include files are not in the normal place */ #include "/usr/include/sys/cdefs.h" #undef __flexarr #define __flexarr [1] #endif
c2.o: In function `main': c2.o(.text+0x14): undefined reference to `cout' c2.o(.text+0x19): undefined reference to `ostream::operator<<(char const *)' c2.o(.text+0x32): undefined reference to `cout' c2.o(.text+0x37): undefined reference to `ostream::operator<<(char const *)' c2.o(.text+0x42): undefined reference to `ostream::operator<<(int)' c2.o(.text+0x55): undefined reference to `endl(ostream &)' c2.o(.text+0x6e): undefined reference to `cout' c2.o(.text+0x73): undefined reference to `ostream::operator<<(char const *)' c2.o(.text+0x7e): undefined reference to `ostream::operator<<(int)' c2.o(.text+0x91): undefined reference to `endl(ostream &)' collect2: ld returned 1 exit statusthen it is possible that you have not built libcomo properly and/or have not told Comeau C++ to use libcomo after you built it (the source file may have compiled because it picked up the g++ iostreams headers). To resolve this, ensure you've built libcomo properly and also that you've run como433.setup properly, telling it where your libcomo is.
"/usr/include/g++-3/stl_vector.h", line 110: error: identifier "_M_start" is
undefined
_M_start = _M_allocate(__n);
^
should be clear indication that you are picking up the wrong standard library (note the /usr/include/g++-3 in the error message). As above, to resolve this, ensure you've built libcomo properly and also that you've run como433.setup properly.
As well, you may need to specify /usr/lib/libpthread.so with -lpthread if you built it that way. See their instructions for more details. See their sample run scripts for more details.
-D__null=0L -D__GNUG__to the EDG_DEFAULT_DEFINES environment variable found in /WhereYouInstalledComeauC++/bin/como You can try just the __null define on the command line by itself first, since in some cases that may be enough, before adding it to EDG_DEFAULT_DEFINES. Or, although this is a stronger suggestion, go into the actual stddef.h and add an #ifdef for __COMO__ setting the #define for NULL to 0.