Here's general info on this port which should transcend any particular version:
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. To resolve this, ensure you've built libcomo properly and also that you've run como43101.setup properly, telling it where your libcomo is.
como -c lib1.c lib2.c Compile to object files ar libmylib.a lib1.8 lib2.8 Don't do this yet if instantiations possible como --prelink_objects lib1.8 lib2.8 Bring forth instantiations of these objects ar libmylib.a lib1.8 lib2.8 Now ok como app1.c app2.c libmylib.lib Instantiations from libmylib intact
_main: undefined: main in _mainThis means that you are missing a main().
Comeau C++>como file.cpp Comeau C++>8.out Comeau C++>comoape file1.cpp file2.cpp Comeau C++>8.outTo compile only, without linking, use the -c command line option:
Comeau C++>como xyz.c Compile and link Comeau C++>como -c xyz.c Compile only, results in xyz.8 Comeau C++>comoape -c xyz.c Compile only, results in xyz.oDo not confuse this with the --c (note two dashes not one) option which specifies C90 mode. So if you want to compile but not link a C90 source you'd write:
Comeau C++>como -c --c c.c Comeau C++>comoape -c --c xyz.cNote that you must also use como when link'ing your object files.
Comeau C++>8l c.8 Don't do this, this is an error Comeau C++>8l xyz.o Don't do this, this is an error Comeau C++>como c.8 Compile c.8 into 8.out Comeau C++>comoape xyz.o Compile xyz.o into 8.outTo override the default file name, use the -o option. For instance:
Comeau C++>como xyz.c Comeau C++>8.out <Output here> Comeau C++>como -o abc xyz.c Comeau C++>abc <Output here> Comeau C++>como -c a.cpp b.cpp Comeau C++>como -o xyz a.8 b.8 Comeau C++>xyzAnd do note that it does not matter if there is whitespace after -o, so this is also allowed:
Comeau C++>como -oabc xyz.c
Mixing compiler modes is not fruitful:
Comeau C++>como -c xyz.cpp Comeau C++>como xyz.8 Ok Comeau C++>comoape xyz.8 Don't do thisMixing languages (C and C++) should be ok so long as you're using the same mode, you've used extern "C", etc.
Comeau C++>como -c --c99 cpart.c Comeau C++>como -c cpppart.cpp Comeau C++>como cpart.8 cpppart.8 Should be ok Comeau C++>8.out
Note that you can only suppress a diagnostic with a -D on the error number. If it does not have a -D then you cannot suppress that particular diagnostic.
Note also that you can specific multiple suppressions with multiple --diag_suppresses, for instance:
'--diag_suppress=1' '--diag_suppress=9' '--diag_suppress=111'or together seperated by commas (again with no embedded spaces):
'--diag_suppress=1,9,111'