连接dlib的CMake构建失败

时间:2017-12-15 20:50:58

标签: linux cmake clion dlib

我需要使用dlopen和其他链接功能。我正在用C ++编写CodeHunt。

我正在为项目使用CLion。这是我在最后一行上添加的cmake:

CMake Error at CMakeLists.txt:19 (target_link_libraries):
  Cannot specify link libraries for target "dl" which is not built by this
  project.

这是我得到的错误:

{{1}}

解决方案是什么?

1 个答案:

答案 0 :(得分:0)

target_link_libraries(CodeHunt ${CMAKE_DL_LIBS})

是解决方案...... :)

的一些专家应该是显而易见的
"..which is not built by this project."

行,但是whateva。 感谢Tsyvarev

相关问题