【问题标题】:CMake errors (windows gui)CMake 错误(Windows 图形用户界面)
【发布时间】:2013-09-27 17:22:04
【问题描述】:

我已经尝试了很长时间来解决这个问题,但没有成功。

我想配置和生成一个源; 当我尝试这样做时,我收到了几个错误。

这是结果:

CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:1106 (message):
Unable to find the requested Boost libraries.

Boost version: 1.54.0

Boost include path: C:/Program Files (x86)/boost_1_54_0

The following Boost libraries could not be found:

      boost_serialization

No Boost libraries were found.  You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.

Call Stack (most recent call first):
CMakeLists.txt:6 (find_package)

IRRLICHT_INCLUDE_DIR = IRRLICHT_INCLUDE_DIR-NOTFOUND
IRRLICHT_LIBRARY = IRRLICHT_LIBRARY-NOTFOUND
Could NOT find IRRLICHT (missing:  IRRLICHT_LIBRARY IRRLICHT_INCLUDE_DIR) 
CMake Warning (dev) at CMakeLists.txt:16 (link_directories):
This command specifies the relative path

IRRLICHT_LIBRARY-NOTFOUND

as a link directory.

Policy CMP0015 is not set: link_directories() treats paths relative to the source dir.  Run "cmake --help-policy CMP0015" for policy details.  Use the cmake_policy command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:16 (link_directories):
  This command specifies the relative path

as a link directory.

Policy CMP0015 is not set: link_directories() treats paths relative to the source dir.  Run "cmake --help-policy CMP0015" for policy details.  Use the cmake_policy command to set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

【问题讨论】:

    标签: c++ boost cmake irrlicht


    【解决方案1】:

    运行 cmake-gui 程序并设置正确的路径(源和构建)。

    然后您将能够在下面的窗口中手动编辑一些变量。

    你需要在那里找到:

    Boost_SERIALIZATION_LIBRARY
    

    Boost_SERIALIZATION_LIBRARY_DEBUG
    

    并设置它们,以便它们指向正确的 boost 库,例如:

    D:/boost_1_53_0/stage/lib/libboost_serialization-mgw48-mt-1_53.a
    D:/boost_1_53_0/stage/lib/libboost_serialization-mgw48-mt-d-1_53.a
    

    -d- in name of second path 代表调试

    【讨论】:

    • 太棒了 :) 解决了一个问题。仍然 IRRLICHT 问题尝试向包含目录添加条目但仍然存在问题
    • 太棒了 :) 解决了一个问题。仍然 IRRLICHT 问题尝试向包含目录添加条目但仍然存在问题
    • @user2824393:对于 irrlicht 应该类似:设置 IRRLICHT_INCLUDE_DIR 的值,使其指向包含所在的目录。它通常看起来像:d:/libs/irrlicht/include。然后库也一样,但是这里你需要直接指向 lib 文件
    • 嘿;我尝试按照您的描述设置值但没有成功!还是一样 !当我配置时;这两个值自动删除 另一种想法?感谢您的帮助
    • @user2824393:请告诉我您如何尝试在您的 CmakeList.txt 中找到 irrlicht。 Irrlicht 不是由 find_package 直接处理的库,所以我猜你做了一些技巧。我需要认识他们才能帮助你。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-16
    • 1970-01-01
    • 2016-01-30
    • 1970-01-01
    • 2017-07-26
    • 1970-01-01
    相关资源
    最近更新 更多