我从Github下载了以下存储库。我也下载了mingw。我按照有关如何在Windows上编译的说明进行操作。
我创建了一个构建文件夹。
我打开了cmake-gui。源文件夹指向下载的存储库,其中包含OpenCVSDK,CMakeList等。
最后,我在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