簡體   English   中英

生成軟件包時Cmake錯誤

[英]Cmake error while building a package

好吧,我不知道這是怎么回事? 我只是按照我的Macbook上的一些說明(顯然是針對ubuntu OS)進行操作。

一切順利,直到最后一步。

當我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

我知道這是一個舊堆棧,但是在尋找此問題的解決方案時,它會出現在前幾個搜索命中中。

在OSX中,您可能必須向目標鏈接庫添加“ ncurses”。 即:

TARGET_LINK_LIBRARIES(myProject ncurses $ {LLVM_LIBRARY} [...您的所有庫])

您正在使用標頭term.h,但是包含這些(導出的)符號(del_curterm,...)的庫不在LD路徑term.h上 找到適合您平台的庫,安裝並在-L swich中添加列表。

另請參閱有關目錄不存在的ld警告

暫無
暫無

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

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