Communication error with g ++ 3.4.4 and g ++ 3.4.5
Usage: windows xp, g ++ 3.4.4 with cygwin and g ++ 3.4.5 with mingw.
I am compiling a simple unit test class with cppunit.
When I link to g ++ 3.4.5 I get a lot of linking errors. When I link with g ++ 3.4.4 I don't get any errors and the exe links are fine and works.
I can't trace the errors, so any thoughts?
Thanks.
EDIT: Communication Errors: Errors not related to the error. For instance:
SimpleTest.cpp:(.text+0x313): undefined reference to `CppUnit::Message::Message(std::string const&, std::string const&)'
EDIT: cmd line:
g++ -I g:\projects\thirdparty\cppunit-1.12.1\include -L g:\projects\thirdparty\cppunit-1.12.1\lib -l cppunitd -o main.exe main.cpp SimpleTest.cpp
Update: Same code in Visual Studio: No error, unit test works as expected.
a source to share
Your problem may be due to the wrong communication line. The order of sources / object files and libraries on the link line matters . Correct link line:
g++ -I g:\projects\thirdparty\cppunit-1.12.1\include \
-L g:\projects\thirdparty\cppunit-1.12.1\lib \
-o main.exe main.cpp SimpleTest.cpp -lcppunitd
a source to share
As g ++ matures, I'm at 4.2.3, this type checking has gotten more pedantic and, for that matter, better. With a little information, I would say that you should carefully study your calls for these methods. I suspect the types are not entirely correct. 3.4.4 won't catch, 3.4.5 does. .... JW