简体   繁体   English

生成软件包时Cmake错误

[英]Cmake error while building a package

Ok, I have no clue what is going on? 好吧,我不知道这是怎么回事? I am just following some instructions (apparently for ubuntu OS) on my macbook. 我只是按照我的Macbook上的一些说明(显然是针对ubuntu OS)进行操作。

Everything was going fine until the last step. 一切顺利,直到最后一步。

When I do make , I see the following error: 当我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

What am i missing? 我想念什么?

My Cmakelists.txt file http://collabedit.com/8vc7s 我的Cmakelists.txt文件http://collabedit.com/8vc7s

I know this is an old stack but it shows up in the first few search hits when seeking solution for this problem. 我知道这是一个旧堆栈,但是在寻找此问题的解决方案时,它会出现在前几个搜索命中中。

In OSX you might have to add "ncurses" to your target link libraries. 在OSX中,您可能必须向目标链接库添加“ ncurses”。 Ie: 即:

TARGET_LINK_LIBRARIES ( myProject ncurses ${LLVM_LIBRARY} [... all of your libraries]) TARGET_LINK_LIBRARIES(myProject ncurses $ {LLVM_LIBRARY} [...您的所有库])

You are using header term.h, but the library that contains these (exported) symbols (del_curterm, ...) is not on your LD path term.h . 您正在使用标头term.h,但是包含这些(导出的)符号(del_curterm,...)的库不在LD路径term.h上 Find the library that has it for your platform, install it and add list it in -L swich. 找到适合您平台的库,安装并在-L swich中添加列表。

Also see the ld warning about unexisting directories 另请参阅有关目录不存在的ld警告

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM