我是靠谱客的博主 哭泣音响,最近开发中收集的这篇文章主要介绍The following variables are used in this project, but they are set to NOTFOUND. CHOLMOD_LIBRARY,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

同一个包在电脑的Ubuntu16.04下可以编译,却无法在tx2的Ubuntu16.04下编译,而且没有缺少包。

报错

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CHOLMOD_LIBRARY

cmakelists 相关代码

find_package(SuiteSparse REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR} ${CHOLMOD_INCLUDE_DIR})
cs_add_executable(xxx src/xxx.cpp)
target_link_libraries(xxx ${CHOLMOD_LIBRARY})

SuiteSparse和CHOLMOD应该是有很大关联的,找到SuiteSparse就应该找到CHOLMOD_LIBRARY了。但在tx2上明明都安装了,却无论如何都没有找到。

解决

把库连接改成一下形式,最终解决问题

target_link_libraries(xxx cholmod)

最后

以上就是哭泣音响为你收集整理的The following variables are used in this project, but they are set to NOTFOUND. CHOLMOD_LIBRARY的全部内容,希望文章能够帮你解决The following variables are used in this project, but they are set to NOTFOUND. CHOLMOD_LIBRARY所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(78)

评论列表共有 0 条评论

立即
投稿
返回
顶部