我已经尝试了大多数建议,但仍然在某处失败。有人可以一步一步地引导我吗?我正在使用 cmake 3.2.2 和 vs2013。我也有 boost_1_57_0。
这是camke一直发给我的错误信息
CMake Error at C:/Program Files/CMake/share/cmake-3.2/Modules/FindBoost.cmake:1182 (message):
Unable to find the requested Boost libraries.
Unable to find the Boost header files. Please set BOOST_ROOT to the root
directory containing Boost or BOOST_INCLUDEDIR to the directory containing
Boost's headers.
Call Stack (most recent call first):
C:/dlib-18.15/dlib/add_python_module:37 (FIND_PACKAGE)
CMakeLists.txt:5 (include)
CMake Error at C:/Program Files/CMake/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
(Required is at least version "2.6")
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:374 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.2/Modules/FindPythonLibs.cmake:205 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
C:/dlib-18.15/dlib/add_python_module:38 (FIND_PACKAGE)
CMakeLists.txt:5 (include)
我可以在 CMakeLists.txt 文件
中输入什么吗?如果是这样,我可以按照应输入的确切方式获得它吗?
最佳答案
看看这些帖子,看看它们是否对您有帮助。可以通过在顶层 CMakeLists.txt 中设置路径来解决很多此类问题。
它应该看起来像这样:
set(BOOST_ROOT "C:\boost")
以下是对同一问题的一些其他引用:
cmake doesn't find boost libraries
How can I get cmake to find my alternative boost installation?
关于python - 找不到 boost 或 python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30192575/