久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

使用 pkg-config 輸出將庫鏈接到 QT 項(xiàng)目

Linking libraries to a QT project using pkg-config output(使用 pkg-config 輸出將庫鏈接到 QT 項(xiàng)目)
本文介紹了使用 pkg-config 輸出將庫鏈接到 QT 項(xiàng)目的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

這是一個新手問題.我正在嘗試將 OpenCV 庫添加到 QT 項(xiàng)目中.

This is a bit of a newbie question. I am trying to add the OpenCV libraries to a QT project.

這個問題表示鏈接標(biāo)志由

pkg-config --libs opencv

如果我將命令行輸出粘貼到項(xiàng)目文件中,例如:

If I paste the command line output into the project file like:

LIBS += -L/usr/local/lib -lml -lcvaux -lhighgui -lcv -lcxcore

然后一切都可以正常編譯,但現(xiàn)在這不是可移植的.如何簡單地引用命令的輸出?

then everything compiles fine, but now this isn't portable. How can I simply reference the output of the command?

更新:嘗試了 Ken Bloom 的建議,但無法編譯.實(shí)際生成的編譯器命令是

Update: Tried Ken Bloom's suggestion, but it won't compile. The actual generated compiler commands are

# How it should be, at least on my machine
g++ -o QOpenCVTest main.o qopencvtest.o moc_qopencvtest.o -L/usr/lib -L/usr/local/lib -lml -lcvaux -lhighgui -lcv -lcxcore -lQtGui -lQtCore -lpthread

# with CONFIG and PKGCONFIG
g++ -o QOpenCVTest main.o qopencvtest.o moc_qopencvtest.o -L/usr/lib -lQtGui -lQtCore -lpthread

推薦答案

CONFIG += link_pkgconfig
PKGCONFIG += opencv

(我從 http://beaufour.dk/blog/得到這個答案2008/02/using-pkgconfig.html)

這篇關(guān)于使用 pkg-config 輸出將庫鏈接到 QT 項(xiàng)目的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

How can I read and manipulate CSV file data in C++?(如何在 C++ 中讀取和操作 CSV 文件數(shù)據(jù)?)
In C++ why can#39;t I write a for() loop like this: for( int i = 1, double i2 = 0; (在 C++ 中,為什么我不能像這樣編寫 for() 循環(huán): for( int i = 1, double i2 = 0;)
How does OpenMP handle nested loops?(OpenMP 如何處理嵌套循環(huán)?)
Reusing thread in loop c++(在循環(huán) C++ 中重用線程)
Precise thread sleep needed. Max 1ms error(需要精確的線程睡眠.最大 1ms 誤差)
Is there ever a need for a quot;do {...} while ( )quot; loop?(是否需要“do {...} while ()?環(huán)形?)
主站蜘蛛池模板: 亚洲欧美综合 | 国产一区二区久久 | 亚洲午夜视频在线观看 | 日韩区| 日本免费一区二区三区视频 | 国产精品视频网 | 男人天堂99 | 精品免费国产视频 | 一区二区福利视频 | 欧美一区2区三区3区公司 | 操夜夜| 亚洲国产成人av好男人在线观看 | 九九久久精品 | 激情国产 | 美女天天操 | 久久99精品久久久久久国产越南 | 精品欧美乱码久久久久久1区2区 | 天天操夜夜看 | a级在线 | 亚洲精品国产成人 | 伊人爽| 毛片.com| 四虎成人免费视频 | 久久精品手机视频 | 欧美福利三区 | 青青草社区| 免费观看日韩精品 | 在线色网 | 亚洲 中文 欧美 日韩 在线观看 | 国产精品久久久久久久免费大片 | 日韩资源| 色吊丝2 | 天堂一区 | 久久国产成人午夜av影院武则天 | 久久国产激情视频 | 亚洲一区在线日韩在线深爱 | 国产真实精品久久二三区 | 91久久北条麻妃一区二区三区 | 综合久久av | 亚洲一区二区精品视频在线观看 | 精品一区二区三区四区视频 |