我无法构建mlpack?

我正在使用mlpack库(C++机器学习库)。我按照这里的keon的步骤进行操作:构建mlpack,但在执行到最后一步构建mlpack时,命令行中出现了以下错误:

-- 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 - doneCMake Warning (dev) at CMakeLists.txt:51 (if):Policy CMP0054 is not set: Only interpret if() arguments as variables orkeywords when unquoted. Run "cmake --help-policy CMP0054" for policydetails. Use the cmake_policy command to set the policy and suppress thiswarning.Quoted variables like "MSVC" will no longer be dereferenced when the policyis 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 orkeywords when unquoted. Run "cmake --help-policy CMP0054" for policydetails. Use the cmake_policy command to set the policy and suppress thiswarning.Quoted variables like "MSVC" will no longer be dereferenced when the policyis 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! Cannotdetermine what to link against.Call Stack (most recent call first):CMakeLists.txt:189 (find_package)

回答:

你的armadillo安装可能出现了问题,更具体地说,你没有指定armadillo的包含目录。

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

指定库、dll的路径并设置一些定义,详细信息可以在这里找到

因此,你可以尝试在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")

Related Posts

L1-L2正则化的不同系数

我想对网络的权重同时应用L1和L2正则化。然而,我找不…

使用scikit-learn的无监督方法将列表分类成不同组别,有没有办法?

我有一系列实例,每个实例都有一份列表,代表它所遵循的不…

f1_score metric in lightgbm

我想使用自定义指标f1_score来训练一个lgb模型…

通过相关系数矩阵进行特征选择

我在测试不同的算法时,如逻辑回归、高斯朴素贝叶斯、随机…

可以将机器学习库用于流式输入和输出吗?

已关闭。此问题需要更加聚焦。目前不接受回答。 想要改进…

在TensorFlow中,queue.dequeue_up_to()方法的用途是什么?

我对这个方法感到非常困惑,特别是当我发现这个令人费解的…

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注