1

I am getting an odd Unit Test ++ linking error using Xcode as my ide. Now I did set the project up with two targets. one target that will do the test the other will do nothing for now.

Note I did link the library and ran the simple working example from the tutorial. and I compiled it using gcc 4.2.1 from macports.

"std::string::c_str() const", referenced from: UnitTest::MemoryOutStream::GetText() const in libUnitTest++.a(MemoryOutStream.o) "std::basic_ostringstream, std::allocator >::str() const", referenced from: UnitTest::MemoryOutStream::GetText() const in libUnitTest++.a(MemoryOutStream.o) "std::basic_ostream >::~basic_ostream()", referenced from: construction vtable for std::ostream-in-UnitTest::MemoryOutStream in libUnitTest++.a(TestRunner.o) construction vtable for std::ostream-in-UnitTest::MemoryOutStream in libUnitTest++.a(Test.o) "std::basic_ostream >::~basic_ostream()", referenced from: construction vtable for std::ostream-in-UnitTest::MemoryOutStream in libUnitTest++.a(TestRunner.o) construction vtable for std::ostream-in-UnitTest::MemoryOutStream in libUnitTest++.a(Test.o)

4

1 に答える 1

0

さて、標準ライブラリをllvm osx標準ライブラリではなくGNU標準ライブラリに切り替えたときに、すべての問題が解消されました。ビルド設定に移動します c++ 標準ライブラリ libstdc++ (GNU C++ 標準ライブラリ)

于 2012-11-03T00:08:34.970 に答える