从Github编译SDM代码

时间:2017-05-05 19:24:07

标签: c++ c++11 github cmake mingw32

我从Github下载了以下存储库。我也下载了mingw。我按照有关如何在Windows上编译的说明进行操作。

  1. 我创建了一个构建文件夹。

  2. 我打开了cmake-gui。源文件夹指向下载的存储库,其中包含OpenCVSDK,CMakeList等。

  3. 我用作MinGW Makefiles的生成器。
  4. 然后:configure and generate。
  5. 我cd到build文件夹。
  6. 我打开了cmd并写了mingw32-make
  7. 最后,我在cmd中收到以下消息:

    Microsoft Windows [Version 10.0.15063]
    (c) 2017 Microsoft Corporation. All rights reserved.
    
    C:\Users\user\Documents\face-detection-algorithm\sdm-master\build>mingw32-make
    Scanning dependencies of target SRC
    [ 20%] Building C object CMakeFiles/SRC.dir/src/include/hog.c.obj
    C:\Users\user\Documents\face-detection-algorithm\sdm-master\source\src\include\hog.c:16:9: warning: #pragma once in main file
     #pragma once
             ^~~~
    [ 40%] Building CXX object CMakeFiles/SRC.dir/src/include/ldmarkmodel.cpp.obj
    C:\Users\user\Documents\face-detection-algorithm\sdm-master\source\src\include\ldmarkmodel.cpp:1:9: warning: #pragma once in main file
     #pragma once
             ^~~~
    [ 60%] Linking CXX static library libSRC.a
    [ 60%] Built target SRC
    Scanning dependencies of target Roboman-SDM-TEST
    [ 80%] Building CXX object CMakeFiles/Roboman-SDM-TEST.dir/src/test_model.cpp.obj
    [100%] Linking CXX executable Roboman-SDM-TEST.exe
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0xb2): undefined reference to `cv::noArray()'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0xc5): undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0xe5): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x107): undefined reference to `cv::add(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::_InputArray const&, int)'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x24a): undefined reference to `cv::operator*(cv::Mat const&, double)'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x26a): undefined reference to `cv::operator+(cv::MatExpr const&, cv::Scalar_<double> const&)'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x28a): undefined reference to `cv::operator+(cv::MatExpr const&, cv::Scalar_<double> const&)'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x2a4): undefined reference to `cv::operator*(cv::MatExpr const&, double)'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x2c1): undefined reference to `cv::operator+(cv::MatExpr const&, cv::Scalar_<double> const&)'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x39c): undefined reference to `cv::operator*(cv::Mat const&, double)'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x3bc): undefined reference to `cv::operator+(cv::MatExpr const&, cv::Scalar_<double> const&)'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x3dc): undefined reference to `cv::operator+(cv::MatExpr const&, cv::Scalar_<double> const&)'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x3f6): undefined reference to `cv::operator*(cv::MatExpr const&, double)'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x416): undefined reference to `cv::operator+(cv::MatExpr const&, cv::Scalar_<double> const&)'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x609): undefined reference to `cv::noArray()'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x647): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x675): undefined reference to `cv::minMaxLoc(cv::_InputArray const&, double*, double*, cv::Point_<int>*, cv::Point_<int>*, cv::_InputArray const&)'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x689): undefined reference to `cv::noArray()'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x6cf): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x6fd): undefined reference to `cv::minMaxLoc(cv::_InputArray const&, double*, double*, cv::Point_<int>*, cv::Point_<int>*, cv::_InputArray const&)'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x7c7): undefined reference to `cv::noArray()'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x805): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x839): undefined reference to `cv::minMaxLoc(cv::_InputArray const&, double*, double*, cv::Point_<int>*, cv::Point_<int>*, cv::_InputArray const&)'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x84d): undefined reference to `cv::noArray()'
    CMakeFiles\Roboman-SDM-TEST.dir/objects.a(test_model.cpp.obj):test_model.cpp:(.text+0x893): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
    

    并继续列表。我没有得到任何可执行文件。我能知道该怎么做吗?

    以下是回购的链接:https://github.com/RoboPai/sdm

0 个答案:

没有答案