以下代码编译时没有错误,但是当我尝试执行它时,我得到了" 程序入口点_ZSt24__throw_out_of_range_fmtPKcz无法位于动态链接库libopencv_core2413.dll ",原始消息是葡萄牙语.
#include "opencv2/highgui.hpp"
#include "opencv2/core.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/opencv.hpp"
#include "opencv2/opencv_modules.hpp"
int main()
{
cv::Mat a;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
好吧,最初我是从源代码构建的,在sourceforge链接下载https://sourceforge.net/projects/opencvlibrary/cmake版本是3.5.0-rc2,mingw版本是4.9.3,opencv版本是2.4 0.13.我在我的mingw上安装了haskell和allegro5库的ghc.
下载后,我在C:/ opencv中提取它.使用cmake-gui我将源文件夹设置为C:/ opencv/sources,将build设置为C:/ opencv/build.关于配置标志,我只是取消标记BUILD_opencv_pyhon,因为我没有安装python.这是配置和生成步骤的日志:
Detected version of GNU GCC: 49 (409)
CUDA compilation is disabled (due to only Visual Studio compiler supported on your platform).
General configuration for OpenCV 2.4.13 =====================================
Version control: unknown
Platform:
Host: Windows 10.0.10586 AMD64
CMake: 3.5.0-rc2
CMake generator: MinGW Makefiles
CMake build tool: C:/MinGW/bin/mingw32-make.exe
Configuration: Release
C/C++:
Built as dynamic …Run Code Online (Sandbox Code Playgroud)