简体   繁体   English

是否有可能在没有安装opencv的linux中运行opencv项目

[英]Is it possible that run the opencv project in linux which didn't install opencv

Now I have a opencv project which was build in Linux platform, and of course it can run successfully. 现在我有一个在Linux平台上构建的opencv项目,当然它可以成功运行。

I want to share the execution file of the project to other person(like boss), and other person's computer didn't install opencv 我想将项目的执行文件分享给其他人(比如老板),而其他人的电脑没有安装opencv

Is it possible to modified the makefile file to let the other person's computer run the project without installing opencv library? 是否可以修改makefile文件以让其他人的计算机运行项目而无需安装opencv库?

You have to link to static OpenCV libraries. 您必须链接到静态OpenCV库。 This way they are bundled with your executable, so the target system doesn't have to have shared libraries installed. 这样它们就与您的可执行文件捆绑在一起,因此目标系统不必安装共享库。

I've successfully built my executable with RPATH=$ORIGIN , which mean that I can put the openCV libraries in the same directory as the executable. 我用RPATH=$ORIGIN成功构建了我的可执行文件,这意味着我可以将openCV库放在与可执行文件相同的目录中。 This means they don't clash with existing openCV installations (or lack thereof) 这意味着它们不会与现有的openCV安装(或缺乏安装)发生冲突

When you run the executable, you will need the libraries to process the image. 运行可执行文件时,您将需要库来处理图像。 So, those libraries must be present for the processing purpose either by providing them in your system or by linking them to your executable itself. 因此,这些库必须存在才能用于处理目的,方法是在系统中提供它们或将它们链接到可执行文件本身。

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

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