如何在没有环境变量的情况下使用opencv库 [英] How to use opencv library without environment variable
本文介绍了如何在没有环境变量的情况下使用opencv库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想首先打开cv并添加opencv的环境路径。
例如在以下链接中添加的路径
HTTP:// siddhantahuja .wordpress.com / 2011/07/18 /工具入门与 - OpenCV的-2-3-在微软视觉工作室-2010-在 - 窗口7-64位/ [<一个HREF =http://siddhantahuja.wordpress.com/2011/07/18/getting-started-with-opencv-2-3-in-microsoft-visual-studio-2010-in-windows-7-64-bit /target =_ blanktitle =New Window> ^ ]
I want to initial open cv with adding environment path for opencv.
for example the path added in following link
http://siddhantahuja.wordpress.com/2011/07/18/getting-started-with-opencv-2-3-in-microsoft-visual-studio-2010-in-windows-7-64-bit/[^]
推荐答案
详细说明,您可以在命令提示符中设置环境变量,从该命令提示符启动MSVC开发人员环境,MSVC将继承这些环境。 vars。
无需设置用户范围(或更糟糕的系统范围)环境。 vars。
这在许多情况下都很有用。假设您有一个或多个使用zlib的项目,但不希望包含整个源代码分发。您可以从批处理文件f.ex.设置环境varZLIB指向本地zlib目录,从中启动msdev,然后引用此env。变种。包括。等
To elaborate, you can set environment variables in a command prompt, start the MSVC developer environment from that command prompt, and MSVC will inherit those env. vars.
There is no need to set user-wide (or worse, system-wide) env. vars.
This can be useful in many instances. Say you have one or more projects using zlib, but don't want to include the whole source distribution. You can from a batchfile f.ex. set env. var "ZLIB" to point to your local zlib directory, start msdev from it, and then refer to this env. var. for includes. etc like "
{ZLIB} \include或
{ZLIB}\include" or "
(ZLIB)\ include。
++运气;
(ZLIB)\include".
++luck;
这篇关于如何在没有环境变量的情况下使用opencv库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文