好的,我不知道發生了什麼事情?我只是在我的MacBook上遵循一些指令(顯然是用於Ubuntu操作系統)。Cmake構建包時出錯
一切都很好,直到最後一步。
當我做make
,我看到以下錯誤:
Linking CXX executable ../../bin/test-wordcount
ld: warning: path '/usr/local/lib/libprotobuf.dylib' following -L not a directory
ld: warning: path '/usr/local/lib/libzmq.dylib' following -L not a directory
Undefined symbols for architecture x86_64:
"_del_curterm", referenced from:
terminalHasColors(int) in libLLVMSupport.a(Process.o)
"_set_curterm", referenced from:
terminalHasColors(int) in libLLVMSupport.a(Process.o)
"_setupterm", referenced from:
terminalHasColors(int) in libLLVMSupport.a(Process.o)
"_tigetnum", referenced from:
terminalHasColors(int) in libLLVMSupport.a(Process.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [bin/test-wordcount] Error 1
make[1]: *** [test/wordcount/CMakeFiles/test-wordcount.dir/all] Error 2
make: *** [all] Error 2
我在想什麼?
我的CMakeLists.txt文件 http://collabedit.com/8vc7s
那是你自己的項目?如果不是,哪個版本的項目是什麼?如果是你自己的,試着在你的CMakeLists.txt中用'-l'(小寫的L)代替'-L'。 – usr1234567
@ user2799037:我在CMakeLists.txt中看不到任何-L:( – Fraz
如何添加你的庫?它應該用'add_library CMake會自動添加正確的-L/-l。 – usr1234567