ubuntu14+qt+qmake+c++11
来源:互联网 发布:我知谁掌管明天 原唱 编辑:程序博客网 时间:2024/06/17 05:54
使用版本:
gcc version 4.9.2
QtCreator version 3.5.1
Qt version 5.5.1
记得想要支持C++11的话,GCC的版本不能太低。
言归正传,具体方法为 在.pro文件中加入下面这一句话即可
QMAKE_CXXFLAGS += -std=c++0x (Qt 4.7)
and
CONFIG += c++11 (Qt5)
Unicode literal
In C++11, you can generate UTF-16 by writing u"MyString"
. This is used by Qt to implement QStringLiteral which is a macro that initializes the QString at compile time without run-time overhead.
QString
someString =
QStringLiteral
(
"Hello"
);
MSVC does not require any special flags and enables the C++11 features by default, but GCC or Clang require -std=c++0x.
By default, Qt5 itself will be compiled with the C++11 flags on compilers that need it.
If you use qmake, you can add that line to your .pro file (Qt5):
CONFIG += c++11
(In Qt4, it should be something like: gcc:CXXFLAGS += -std=c++0x
)
阅读全文
0 0
- ubuntu14+qt+qmake+c++11
- QT中的qmake详解
- QT中的qmake详解
- qt qmake moc pro
- QT中的qmake详解
- linux-qt-qmake
- QT的qmake流程
- qt之qmake
- Qt之使用qmake
- 解决:The process "c:/qt/2010.05/qt/bin/qmake.exe" exited with&nbs
- QT 中qmake 的使用
- Qmake在QT中的使用
- qt中的qmake命令设置
- qt中的qmake命令设置
- qmake+mingw手工编译qt
- Qt的qmake脚本编写
- QT学习笔记之 qmake
- Qt解读之qmake手册
- 1001. 害死人不偿命的(3n+1)猜想 (15)
- LDAP配置 Hadoop Group Mapping参数填写原理
- Pandas数据类型及操作
- RecyclerView的点击事件
- A
- ubuntu14+qt+qmake+c++11
- npm 发布自己package
- IOS仿今日头条布局
- GitHub --介绍
- AngularJS select组件如何默认选中状态
- c++实现大数的加减乘运算(数组存放)
- window下完整安装QT
- 简单设计模式01
- Spring-自动装配