【问题标题】:I can't build mlpack?我无法构建 mlpack?
【发布时间】:2017-06-08 00:18:17
【问题描述】:

我正在研究 mlpack 库(C++ 机器学习库)。我在这里按照 keon 的步骤进行操作:building mlpack,但是当我到达构建 mlpack 的最后一步时,在 cmd 中出现以下错误:

-- Building for: Visual Studio 14 2015
-- The C compiler identification is MSVC 19.0.24213.1
-- The CXX compiler identification is MSVC 19.0.24213.1
-- Check for working C compiler: F:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
-- Check for working C compiler: F:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: F:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
-- Check for working CXX compiler: F:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at CMakeLists.txt:51 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

Quoted variables like "MSVC" will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:64 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

Quoted variables like "MSVC" will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at CMake/FindArmadillo.cmake:326 (message):
ARMADILLO_INCLUDE_DIR-NOTFOUND/armadillo_bits/config.hpp not found! Cannot
determine what to link against.
Call Stack (most recent call first):
CMakeLists.txt:189 (find_package)

【问题讨论】:

    标签: c++ machine-learning mlpack


    【解决方案1】:

    你一定搞砸了你的犰狳安装,更具体地说,你没有指定犰狳包含目录。

    根据this更详细的说明,第10点:

    指定库、dll的路径并设置一些定义,详情可以在here找到

    所以,您可以尝试将这些行添加到您的 mlpack 的 CMakeLists.txt:

    set(ARMADILLO_LIBRARY "C:/Users/yyyy/Qt/3rdLibs/armadillo/armadillo-5.600.2/vc2015_build/bin/vc2015_x86_amd64/release") set(ARMADILLO_INCLUDE_DIR "C:/Users/yyyy/Qt/3rdLibs/armadillo/armadillo-5.600.2/include")

    【讨论】:

    • 你好 Asalle,我没有这个“vc2015_build/bin/vc2015_x86_amd64/release”?
    • 但是,我添加了 "set(ARMADILLO_INCLUDE_DIR "C:\Users\Avrahim\Documents\Visual Studio 2015\Projects\armadillo-7.600.2\include")" 到 cmakelist 并且仍然得到同样的错误!
    • 您好,这意味着您指定了错误的路径,请考虑 [this] (github.com/mlpack/mlpack/issues/511)。您可以执行以下操作: 1. 确保 AR..INCLUDE_DIR 包含您需要的 config.hpp 和所有其他犰狳头文件。 2. 确保 AR..._LIBRARY 是动态库的路径,即。 e. *.dll 在你的情况下来自 github(上面的链接)的人就它进行了对话,他们有点破解了它。如果您遇到此问题,请尝试以任何其他方式安装犰狳,如果不可能,您也可以向犰狳维护者寻求帮助。祝你好运!
    • 这是我在github上的issue,你可以查看:github.com/mlpack/mlpack/issues/856
    • 我在 cmakelists.txt 中找到了以下内容:PATHS "C:/Program Files/Armadillo"。但是,犰狳的路径是:C:\Users\Avrahim\Documents\Visual Studio 2015\Projects\armadillo-7.600.2 这就是你的意思?更改 cmakelists.txt 中犰狳的路径?
    猜你喜欢
    • 2017-03-22
    • 2016-01-05
    • 2020-05-31
    • 2021-11-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-01-20
    相关资源
    最近更新 更多