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

構(gòu)建 qmake 項目時如何使用 C++14 功能?

How can I use C++14 features when building qmake projects?(構(gòu)建 qmake 項目時如何使用 C++14 功能?)
本文介紹了構(gòu)建 qmake 項目時如何使用 C++14 功能?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我目前在我的 Qt 應(yīng)用程序中使用 C++11 功能.但是,我想在我的應(yīng)用程序中使用一些新的 C++14 特性.

I'm currently using C++11 features in my Qt applications. However, I'd like to use some of the new C++14 features in my applications.

要在Qt應(yīng)用程序中啟用C++11,只需在qmake項目文件中添加一行,即:

To enable C++11 in a Qt application, one only needs to add one line in the qmake project file, namely:

CONFIG += c++11

或者對于早期版本:

QMAKE_CXXFLAGS += -std=c++1y

我已經(jīng)嘗試用 C++14 做同樣的事情,但是沒有用.我像這樣更改了 qmake 項目的上述行:

I already tried to do the same with C++14, but it didn't work. I changed the above mentioned line of the qmake project like this:

CONFIG += c++14

或者對于早期版本:

QMAKE_CXXFLAGS += -std=c++1y

之后,在嘗試構(gòu)建項目時出現(xiàn)了許多以前不存在的編譯錯誤.該項目編譯正常,但是,如果我嘗試使用任何 C++14 功能,則會出現(xiàn)編譯錯誤.這是一個例子:

After that, lots of compilation errors, that did not exist before, appear when trying to build the project. The project compiles fine, however, if I try to use any C++14 features, I get a compilation error. This is an example:

template<typename T>
constexpr T pi = T(3.1415926535897932385);

這是相應(yīng)的錯誤:

main.cpp:7: error: template declaration of 'constexpr const T pi'
constexpr T pi = T(3.1415926535897932385);  
          ^

在 QtCreator 中使用 qmake 項目時如何啟用 C++14 功能?

How to enable C++14 features when using a qmake project in QtCreator?

我使用的是 Qt 5.3.2、Qt Creator 3.2.1 和 MinGW 4.8.2 32 位.

I am using Qt 5.3.2, Qt Creator 3.2.1, and MinGW 4.8.2 32 bit.

推薦答案

Qt Creator 只是一個 IDE.

您可以將 IDE 視為更智能文本編輯器",幫助開發(fā)人員進(jìn)行調(diào)試、構(gòu)建、代碼完成、文件管理等.

You can think of IDEs as "smarter text editors" that aid the developer with debugging, building, code completion, file management and so on.

IDE 在編譯過程中無關(guān)緊要.

IDEs are irrelevant during compilation.

重要的是您的編譯器.獨立于您的 IDE.

g++ 4.8.x 不支持許多 C++14 功能:查看此頁面以了解支持哪些 C++14 功能.

g++ 4.8.x does not support many C++14 features: check out this page to learn what C++14 features are supported.

這篇關(guān)于構(gòu)建 qmake 項目時如何使用 C++14 功能?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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精品99| 91黄在线观看 | 91精品国产欧美一区二区成人 | 国产精品国产精品国产专区不片 | 国产视频日韩 | 亚洲精品九九 | 中文字幕丁香5月 | 天天看天天操 | 完全免费av在线 | 日韩在线免费电影 | 国产精品毛片 | 午夜久久久久久久久久一区二区 | 99精品视频在线观看 | 日韩小视频| 一级做a爰片性色毛片视频停止 | 美女视频黄的 | 国产欧美一区二区久久性色99 | 日韩精品一二三区 | 一区二区三区电影在线观看 | 色吧综合 | 欧美13videosex性极品 | 亚洲成人一区 | 久久久黄色 | 天天综合永久入口 | 一区二区在线不卡 | 99精品欧美| 日韩一区二区三区视频 | 精品国产欧美一区二区三区不卡 | 亚洲国产一区二区三区在线观看 | 国产小视频自拍 | 亚洲国产成人精品久久久国产成人一区 | 国产乱人伦精品一区二区 | 精品美女久久久久久免费 | 91九色视频| 99视频在线看| 国产久 |