簡體   English   中英

使用UnitTest ++鏈接錯誤

[英]Linking Error with UnitTest++

我使用Xcode作為我的想法時遇到了奇怪的單元測試++鏈接錯誤。 現在,我確實為項目設置了兩個目標。 一個目標將進行測試,另一個目標將暫時不執行任何操作。

注意,我確實鏈接了庫並運行了教程中的簡單工作示例。 我使用macports中的gcc 4.2.1進行了編譯。

“ std :: string :: c_str()const”,引用自libUnitTest ++。a(MemoryOutStream.o)中的UnitTest :: MemoryOutStream :: GetText()const“ std :: basic_ostringstream,std :: allocator> :: str( )const”,引用自:libUnitTest ++。a(MemoryOutStream.o)中的UnitTest :: MemoryOutStream :: GetText()const“ std :: basic_ostream> ::〜basic_ostream()”,引用自:std :: ostream的構造vtable libUnitTest ++。a(TestRunner.o)中的-in-UnitTest :: MemoryOutStream構建libtableTest ++。a中std :: ostream-in-UnitTest :: MemoryOutStream的vtable“ std :: basic_ostream> ::〜basic_ostream( )”,引用自:libUnitTest ++。a(TestRunner.o)中std :: ostream-in-UnitTest :: MemoryOutStream的構造vtable,libUnitTest ++。a(測試中:std :: ostream-in-UnitTest :: MemoryOutStream的構造vtable。 o)

好的,所以當我將std庫切換到GNU標准庫而不是llvm osx標准庫時,所有問題都消失了。 所以去建立設置c ++標准庫libstdc ++(GNU C ++標准庫)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM