对于OpenCV的设置编译器的路径 [英] Set compiler path for OpenCV

查看:264
本文介绍了对于OpenCV的设置编译器的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图运行使用cv.h图书馆借了一些样品C程序,但实际情况是,编译抱怨该文件无法找到。所以我猜我需要一些如何设置编译器的路径。我该怎么做呢?

I have been trying to run some sample c programs that uses the cv.h library, but what happened was that the compile complains the file could not be found. So I am guessing I need to some how set the compiler's path. How do I do that?

推荐答案

在Linux中,我使用 pkg配置以协助我在该任务:

On linux, I use pkg-config to assist me on that task:

g++ program.cpp -o program `pkg-config --cflags --libs opencv`

这篇关于对于OpenCV的设置编译器的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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