openCV与Visual Studio 2013版的集成

openCV与Visual Studio 2013版的集成,opencv,visual-studio-2013,Opencv,Visual Studio 2013,首先,谢谢你的阅读。我读了很多关于如何在VS2013中安装openCV的教程。我认为我正确地跟随了所有的步骤,但是最后当我运行控制台Win32应用程序C++时,我得到了这个错误: 'openCV.exe' (Win32): Loaded 'C:\Users\GASTON\Documents\Visual Studio 2013\Projects\openCV\x64\Debug\openCV.exe'. Symbols loaded. 'openCV.exe' (Win32): Loaded '

首先,谢谢你的阅读。我读了很多关于如何在VS2013中安装openCV的教程。我认为我正确地跟随了所有的步骤,但是最后当我运行控制台Win32应用程序C++时,我得到了这个错误:

'openCV.exe' (Win32): Loaded 'C:\Users\GASTON\Documents\Visual Studio 2013\Projects\openCV\x64\Debug\openCV.exe'. Symbols loaded.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Users\GASTON\Documents\opencv\build\x64\vc11\bin\opencv_highgui2410d.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Users\GASTON\Documents\opencv\build\x64\vc11\bin\opencv_core2410d.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\msvcp120d.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\msvcr120d.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\comctl32.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\msvfw32.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\avifil32.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\avicap32.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\msvcp110d.dll'. Symbols loaded.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\msvcr110d.dll'. Symbols loaded.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\winmm.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\msacm32.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\devobj.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Cannot find or open the PDB file.
'openCV.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'. Cannot find or open the PDB file.
The program '[5168] openCV.exe' has exited with code -1 (0xffffffff).
我不明白为什么VS不能加载库,因为我做了所有配置(至少我认为是这样)

我的全球风险值是:

PATH= "C:\Users\GASTON\Documents\opencv\build\x64\vc11\bin";
安装open的位置

这是我的代码main.cpp

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>

using namespace cv;
using namespace std;

int main(int argc, char** argv)
{
    if (argc != 2)
    {
        cout << " Usage: display_image ImageToLoadAndDisplay" << endl;
        return -1;
    }

Mat image;
image = imread(argv[1], IMREAD_COLOR); // Read the file

if (!image.data) // Check for invalid input
{
    cout << "Could not open or find the image" << std::endl;
    return -1;
}

namedWindow("Display window", WINDOW_AUTOSIZE); // Create a window for display.
imshow("Display window", image); // Show our image inside it.

waitKey(0); // Wait for a keystroke in the window
    return 0;
}
#包括
#包括
#包括
使用名称空间cv;
使用名称空间std;
int main(int argc,字符**argv)
{
如果(argc!=2)
{

cout
vc11
适用于VS2012,对于VS2013,您应该使用
vc12

对于你的情况,改变

PATH= "C:\Users\GASTON\Documents\opencv\build\x64\vc11\bin";


p.s.:还要确保您的项目是在
x64
平台下构建的。

我正在阅读,上面的几行并不意味着错误。错误-1是另一个错误,如果(argc!=2)原因实际上没有收到任何参数,则会导致代码为get int(错误只是为了做而不是为了思考:p)所以给一个图像作为参数,一切都很好。很抱歉打扰你们,希望这对其他有同样问题的人有所帮助=)

此外,还要感谢@herohuyongtao vc11适用于VS2012,对于VS2013,您应该使用vc12

对于你的情况,改变

PATH= "C:\Users\GASTON\Documents\opencv\build\x64\vc11\bin";
PATH=“C:\Users\GASTON\Documents\opencv\build\x64\vc11\bin”; 到

PATH=“C:\Users\GASTON\Documents\opencv\build\x64\vc12\bin”;
p、 s:还要确保您的项目是在x64平台下构建的。

我正在阅读,上面的行并不意味着有错误。错误-1是另一个错误,如果(argc!=2)原因实际上没有收到任何参数,则代码为get int(错误只是为了做而不是为了思考:p)所以,给一个图像作为参数,一切都很好。很抱歉打扰你们,希望这对其他有同样问题的人有帮助:PYou可以将此作为您自己问题的答案提交。即使它有效,这个:PATH=“C:\Users\GASTON\Documents\opencv\build\x64\vc11\bin”是否应该与vc12一起使用?