简体   繁体   English

Visual Studio 2012中的openCV

[英]openCV in visual studio 2012

I am getting an error [I get an error opencv_core242.dll is missing] when trying to compile a test program from http://karanjthakkar.wordpress.com/2012/11/21/usin-opencv-2-4-2-with-visual-studio-2012-on-windows-7-64-bit/ . 尝试从http://karanjthakkar.wordpress.com/2012/11/21/usin-opencv-2-4-2-编译测试程序时遇到错误[我缺少错误opencv_core242.dll] with-visual-studio-2012-on-windows-7-64-bit /

I tried to add the specified information in something called a environment variable, however I do not know if I am doing it correctly. 我试图将指定的信息添加到称为环境变量的内容中,但是我不知道自己是否正确执行了操作。 Can anyone clearly state step-by-step what I am supposed to do to add as the value? 谁能清楚地一步一步说明我应该做些什么来增加价值? I put the paths to the directories that I need but it doesn't seem to resolve this error when I try to build the program. 我将路径放置到所需的目录中,但在尝试构建程序时似乎无法解决此错误。

@Code Head has got one of the answer. @Code Head得到了答案之一。

Or you can just copy all the dll's in opencv/build/vc11/bin into your program directory. 或者,您可以只将opencv/build/vc11/bin所有dll复制到您的程序目录中。

I know this is really an ugly solution but this surely works for a starter. 我知道这确实是一个丑陋的解决方案,但这肯定对初学者有效。 At least I myself find it really useful when I first started using OpenCV. 至少当我第一次使用OpenCV时,我自己觉得它真的很有用。

Here's what you need to do: 这是您需要做的:

  1. RightClick your project in "Solution Explorer" 在“解决方案资源管理器”中右键单击您的项目
  2. Click Properties 单击属性
  3. Navigate to "Configuration Properties -> Debugging" 导航到“配置属性->调试”
  4. In "Local Windows Debugger -> Environment" Write: 在“本地Windows调试器->环境”中输入:

    • Path=$(Path);C:\\path_to_opencv\\build\\x86\\vc11\\bin PATH = $(路径); C:\\ path_to_opencv \\建立\\ 86 \\ VC11 \\ BIN

      or (if compiling 64 bit): 或(如果编译为64位):

    • Path=$(Path);C:\\path_to_opencv\\build\\x64\\vc11\\bin PATH = $(路径); C:\\ path_to_opencv \\建立\\ 64 \\ VC11 \\ BIN

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM