Windows XP、ging ++ 3.4.4 with cygwin、g ++ 3.4.5 with mingw。g ++ 3.4.4およびg ++ 3.4.5とのリンクエラー
私はcppunitで簡単な単体テストクラスをコンパイルしています。
g ++ 3.4.5を使用してリンクすると、多くのリンクエラーが発生します。私がg ++ 3.4.4とリンクするとき、私はエラーを起こさず、exeはうまくリンクして実行されます。
私はエラーをトレースするように見えないので、任意の考えですか?
ありがとうございました。
EDIT:リンクエラー:参照されていない関数エラー。同様に:
SimpleTest.cpp:(.text+0x313): undefined reference to `CppUnit::Message::Message(std::string const&, std::string const&)'
EDIT:CMDライン:
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
更新:Visual Studioで同じコード:エラーなし、ユニットテスト期待通りに動作します。
エラーは何ですか? – stimms
エラーは何ですか?リンカーのコマンドラインは何ですか? –
とコマンドライン? –