使用Visual Studio 2008构建OpenCV应用程序并从另一台计算机运行它 [英] Building an OpenCV application with Visual Studio 2008 and running it from another computer

查看:126
本文介绍了使用Visual Studio 2008构建OpenCV应用程序并从另一台计算机运行它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Visual Studio 2008做了一个简单的OpenCV应用程序,我已经在发布模式和调试模式下构建它。它的工作正常从我的电脑,但当我尝试从另一台计算机上运行它没有OpenCV安装或有另一个版本的Visual Studio与OpenCV它不工作。

I've made a simple OpenCV application with Visual Studio 2008 and I've built it in both release mode and debug mode.It works fine from my computer but when I try to run it from another computer which doesn't have OpenCV installed or has another version of Visual Studio with OpenCV it doesn't work.

如何使应用程序工作的计算机,没有Visual Studio或OpenCV安装?

How can I make the app work from a computer which doesn't have either Visual Studio or OpenCV installed ?

我想添加外部依赖(lib和dll)到应用程序的文件夹,改变Visual Studio中的路径并重建它。

I'm thinking to add the external dependencies ( lib's and dll's ) into the app's folder, change the path in Visual Studio and rebuild it.

提前感谢并对超人问题感到遗憾:)

Thanks in advance and sorry for the ultranoobish question :)

推荐答案

你不需要分发libs;

只需将dll拷贝到可执行文件可以看到的位置(在与exe相同的目录中,或者在系统路径上的目录中),然后你应该是金。

You don't need to distribute the libs; those are just needed for building the executable.
Just copy the dlls somewhere where the executable can see them (either in the same dir as the exe, or in a dir that's on the system path) and you should be golden.

这篇关于使用Visual Studio 2008构建OpenCV应用程序并从另一台计算机运行它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆