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

使用 qmake/Qt Creator 與調試/發布庫鏈接

Linking with a debug/release lib with qmake/Qt Creator(使用 qmake/Qt Creator 與調試/發布庫鏈接)
本文介紹了使用 qmake/Qt Creator 與調試/發布庫鏈接的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在使用 Qt Creator 并且有一個依賴于 C++ 靜態庫項目的 Qt GUI 項目.我想將 GUI 應用程序的發布版本與 .lib 的發布版本和 GUI 應用程序的調試版本與調試 .lib 鏈接起來.通過在我的 .pro 文件中包含如下一行,我找到了如何向項目添加其他庫的方法:

LIBS += -L./libfolder -lmylib.lib

但我不知道如何使用不同的 -L 命令進行發布和調試版本.

qmake 是否支持這樣做?

解決方案

在你的項目文件中你可以做這樣的事情

調試{LIBS += -L./libfolder -lmydebuglib.lib}釋放 {LIBS += -L./libfolder -lmyreleaselib.lib}

如果 DEBUG 已添加到 CONFIG qmake 變量中,則使用調試括號內的位,如果 RELEASE 已添加到 CONFIG 變量中,則釋放括號內的內容也將包含在內.

您也可以使用!debug"而不是release"(即當調試不在配置中時)

您可以在此處找到有關 qmake 的更多信息.>

I am using Qt Creator and have a Qt GUI project that depends on a C++ static library project. I want to link the release version of the GUI app with the release build of the .lib and the debug release of the GUI app with the debug .lib. I have found out how to add additional libraries to the project by including a line like the following in my .pro file:

LIBS += -L./libfolder -lmylib.lib

But I cannot see how I can use a different -L command for release and debug builds.

Is there support in qmake to do this?

解決方案

In your project file you can do something like this

debug {
    LIBS += -L./libfolder -lmydebuglib.lib
}

release {
    LIBS += -L./libfolder -lmyreleaselib.lib
}

The bit inside the debug braces is used if DEBUG has been added to the CONFIG qmake variable, similarly stuff inside the release brackets is included if RELEASE has been added to the CONFIG variable.

You can also use "!debug" rather than "release" (i.e. when debug isn't in the config)

You can find more information on qmake here.

這篇關于使用 qmake/Qt Creator 與調試/發布庫鏈接的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

相關文檔推薦

How can I read and manipulate CSV file data in C++?(如何在 C++ 中讀取和操作 CSV 文件數據?)
In C++ why can#39;t I write a for() loop like this: for( int i = 1, double i2 = 0; (在 C++ 中,為什么我不能像這樣編寫 for() 循環: for( int i = 1, double i2 = 0;)
How does OpenMP handle nested loops?(OpenMP 如何處理嵌套循環?)
Reusing thread in loop c++(在循環 C++ 中重用線程)
Precise thread sleep needed. Max 1ms error(需要精確的線程睡眠.最大 1ms 誤差)
Is there ever a need for a quot;do {...} while ( )quot; loop?(是否需要“do {...} while ()?環形?)
主站蜘蛛池模板: 久久久精彩视频 | 欧美一区在线视频 | 久久99久久| 中文字幕第5页 | 中文字幕在线一区二区三区 | 国产欧美一区二区三区国产幕精品 | 欧美久久一区二区 | 久久国产美女视频 | 黄色毛片一级 | 免费一看一级毛片 | 久久亚洲国产 | 日日夜夜91 | 天天影视亚洲综合网 | 国产精品久久久久久一区二区三区 | 国产精品亚洲一区二区三区在线 | 国产探花在线精品一区二区 | 精品二区视频 | 视频一区二区在线观看 | 婷婷在线视频 | 国产精品亚洲二区 | 久久精品久久精品久久精品 | 国产精品视频一区二区三区四蜜臂 | 国产精品视频500部 a久久 | 欧美婷婷 | 久久精品日 | 国产欧美在线观看 | 国产女人第一次做爰毛片 | 国产在线拍偷自揄拍视频 | 国产精品免费一区二区三区四区 | 日韩国产高清在线观看 | 一区二区视频 | 亚洲91av| 521av网站 | 国产精品久久久久久久久 | 欧美国产一区二区三区 | 国产成人午夜精品影院游乐网 | 亚洲精品区 | 国产成人免费视频网站高清观看视频 | av网址在线| 亚洲天堂一区二区 | 特黄一级 |