【发布时间】:2018-10-25 05:28:39
【问题描述】:
我有一个项目,我能够在 Linux 中编译,但也希望在 Windows 环境中编译,即 Visual Studio。
我安装了 netcdf,但是当我使用 cmake 构建时,我得到了这个错误:
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
1> -- Checking for one of the modules 'netcdf'
1> CMake Error at C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.11/Modules/FindPkgConfig.cmake:641 (message):
1> None of the required 'netcdf' found
知道如何让 Visual Studio 找到 netcdf 包吗?
【问题讨论】:
-
您可能需要在配置 cmake 时指定路径.. 但这只是猜测。
-
@Ben 你能发布 一些 你的 CMakeLists.txt 吗?你调用
find_package的部分?
标签: c++ cmake visual-studio-2017 netcdf