找不到boost或python

时间:2015-05-12 13:37:52

标签: python c++ boost cmake

我已经尝试了大多数建议,但仍然在某处失败。有人可以一步一步走过我吗?我正在使用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 file吗?如果是这样,我可以按照输入的确切方式使用它吗?

1 个答案:

答案 0 :(得分:1)

查看这些帖子,看看它们是否对您有所帮助。通过在顶级CMakeLists.txt中设置路径,可以解决很多这样的问题。

看起来应该是这样的:

set(BOOST_ROOT "C:\boost")

以下是对此同一问题的一些其他参考:

cmake doesn't find boost libraries

How can I get cmake to find my alternative boost installation?