Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/126.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/opencv/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ OpenCV:cmd.get<;字符串>;不起作用_C++_Opencv - Fatal编程技术网

C++ OpenCV:cmd.get<;字符串>;不起作用

C++ OpenCV:cmd.get<;字符串>;不起作用,c++,opencv,C++,Opencv,我在这段代码的最后一行遇到以下错误(我通过在每一行上放置断点进行调试): 根本没有编译错误,但当我调试/运行时,它无法给出上述消息。为什么会这样 如果我转到cmd并这样做: C:\Users\shaazi\Documents\Visual Studio 2010\Projects\OCL_2.4.9\x64\Debug>OCL_2.4. 9.exe squares i 我收到一条调试断言失败的消息 我在Windows7上运行这个,64位,MSVC2010,OpenCV版本是2.4.9 本

我在这段代码的最后一行遇到以下错误(我通过在每一行上放置断点进行调试):

根本没有编译错误,但当我调试/运行时,它无法给出上述消息。为什么会这样

如果我转到cmd并这样做:

C:\Users\shaazi\Documents\Visual Studio 2010\Projects\OCL_2.4.9\x64\Debug>OCL_2.4.
9.exe squares i
我收到一条调试断言失败的消息

我在Windows7上运行这个,64位,MSVC2010,OpenCV版本是2.4.9

本节目背景


基本上,该程序是
(EXAMPLE_OCL)squares
,可以在opencv\build_2.4.9\samples\OCL中找到。我复制了c代码并在一个新项目中使用它。当我从它的原始位置运行它时,它工作正常。但是当我复制c文件并在我自己的新项目中使用它时,它不起作用

请确保您没有通过链接任何发布库chance@berak所有这些都以链接器->输入中的249d.lib结尾。但是在Linker->general中,我放了:C:\Users\Shaazi\Desktop\opencv\build\u 2.4.9\install\x64\vc10\lib这个文件夹有249.lib和249d。lib@berak我现在在发布模式下构建这个程序,但问题也在发布模式下出现。@berak基本上程序是
(示例\u OCL)正方形
可以在opencv\build_2.4.9\samples\ocl中找到。我从中复制了c代码并将其用于一个新项目。@berak我现在用工作程序(ocl示例)替换了程序属性页中的内容。现在我发现我的程序core249.lib没有链接,它说无法打开文件opencv_core249d.lib。
Windows has triggered a breakpoint in OCL_2.4.9.exe.

This may be due to a corruption of the heap, which indicates a bug in OCL_2.4.9.exe or any of the DLLs it has loaded.

This may also be due to the user pressing F12 while OCL_2.4.9.exe has focus.

The output window may have more diagnostic information.
C:\Users\shaazi\Documents\Visual Studio 2010\Projects\OCL_2.4.9\x64\Debug>OCL_2.4.
9.exe squares i