安装了带有自制软件的GTK+,但pkg_check_modules无法识别它
Installed GTK+ with homebrew, but pkg_check_modules doesn't recognize it
我正在尝试编译一个开源的repo,这需要gtk+在CMakeLists.txt
文件:
pkg_check_modules (GTK REQUIRED gtk+-2.0>=2.12)
所以我安装了gtk+-2.0与homebrew:
~ brew install gtk
Warning: gtk+-2.24.23 already installed
和确保pkg-config
识别它,我已经尝试:
~ pkg-config --modversion gtk+-2.0
2.24.23
这是完全正确的,但是当我用ccmake ..
配置项目时,我得到了错误:
CMake Error at /usr/local/Cellar/cmake/2.8.12.2/share/cmake/Modules/FindPkgConfig.cmake:279 (message):
A required package was not found
Call Stack (most recent call first):
/usr/local/Cellar/cmake/2.8.12.2/share/cmake/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal)
CMakeLists.txt:194 (pkg_check_modules)
我该如何解决这个问题?
你试过了吗
export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:$PKG_CONFIG_PATH
或
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
# issuecomment - 27215983
你只需要安装pkg-config:
brew install pkg-config
相关文章:
- CHECK(调用)函数在Google Colab中出错
- 如何通过Conan和CMake找到用于pkg配置的.pc文件
- 'make check' GLIBC 运行时的链接问题
- 为什么我会收到"Run-Time Check Failure #2 - Stack around the variable 'pr' was corrupted"错误?
- 尝试构建 pkg 配置
- Opencv4 使用 pkg-config 给出未定义的引用错误
- rpmbuild check-rpath 报告错误,指出路径不是绝对的,不正确的
- 调用 dll 函数时"Run-Time Check Failure #0 - The value of ESP"
- Cygwin pkg-config/protobuf filepath issues
- 如何在Visual Studio Code中使用'pkg-config gtkmm-3.0 --cflags --lib
- 在创建完整对象之前编写 if-can-add check 方法的正确方法?
- 当 pkg-config 不能解决 opencv 'undefined reference'编译问题时,如何解决它?
- "check if member exists using enable_if"中修改的代码不起作用
- Bison-3.0.4 中的 Linux 从头开始错误 'make check'
- 如何在CMAKE(JUCI )中使用PKG-Config
- SQL Server 2016 CLR 存储过程错误:"A system assertion check has failed"
- GTKMM-3.0:使用PKG-Config的程序构建失败的MSYS2 NetBeans
- 如何将 pkg-config 添加到生成文件
- Linux Pybind11 'build check -j 4' 错误
- 十六进制值的SQLITE CHECK约束