【发布时间】:2020-04-22 23:54:23
【问题描述】:
我正在尝试构建包含 'gflags/gflags.h' 的库,但无法找到它。
我用自制软件安装了 gflags 和 glog。
CMake 输出显示:
-- Found installed version of gflags: /usr/local/lib/cmake/gflags
-- Detected gflags version: 2.2.2
-- Found Gflags: /usr/local/include
-- Found Glog: /usr/local/include
在运行"cmake" 时一切正常,没有错误。但是当我运行"make install" 时,它无法构建,并显示"fatal error: 'gflags/gflags.h' file not found"
如何在 OsX 中构建需要 gflags 的库?
【问题讨论】:
-
如果手动设置了 Gflags 路径,请尝试查看 Cmake 文件的内部?
-
在Cmake文件中只有
find_package(Gflags REQUIRED)find_package(Glog REQUIRED) -
您能以某种方式提供 CmakeList 吗?我的猜测是你没有为你的可执行文件链接 gflags 目录。
-
请提供您的 CMake 代码,包括显示您在调用
find_package()后如何使用 Gflags 变量的代码。在没有看到您正在使用的代码的情况下,我们只能猜测问题可能是什么...... -
@ThomasCaissard @squareskittles 谢谢大家这是
include_directories的问题
标签: c++ macos cmake glog gflags