久久久久久久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久久久无码国产精品 | 精品国产欧美日韩不卡在线观看 | 中文字幕在线观看视频网站 | 亚洲免费一区 | 日韩成人免费中文字幕 | 国产亚洲欧美在线 | 天天射天天干 | 免费一区在线 | 日韩免费在线 | 中文字幕一区在线观看视频 | 国产九九精品 | 亚洲综合色网 | 久久久久久久一区 | 成人免费小视频 | 一级特黄视频 | 亚洲精品免费在线观看 | 国产欧美精品一区二区 | 久久精彩视频 | 午夜在线影院 | 国产精品久久久亚洲 | 久久综合欧美 | 一区在线视频 | 国产高清在线观看 | 亚洲精品av在线 | av黄色免费在线观看 | 一级片免费视频 | 日韩精品成人av | 日韩乱码在线 | 亚洲三区视频 | 黄色操视频 | 国产乱码精品1区2区3区 | 在线视频久久 | 国产成在线观看免费视频 | 亚洲视频在线看 | 久久久美女 | 黄色网址免费在线观看 | 日韩成人影院 |