简体   繁体   English

Qt4 Creator / QMAKE等效于“ -mcmodel = medium” GCC编译器设置

[英]Qt4 Creator/QMAKE equivalent to “-mcmodel=medium” GCC compiler settings

I'm using Qt Creator to create a GUI for a fairly memory intensive C++ application on Linux. 我正在使用Qt Creator为Linux上的内存密集型C ++应用程序创建GUI。 In order for the application to run properly, the -mcmodel=medium compiler flag must be set during compilation, otherwise the application will abruptly crash during execution (tried compiling in Qt without it, and it crashes as expected). 为了使应用程序正常运行,必须在编译期间设置-mcmodel = medium编译器标志,否则应用程序将在执行期间突然崩溃(尝试在没有它的Qt中进行编译,并且按预期崩溃)。 How do I set the GCC flags in the .pro file to deal with this directly or is there a Qt equivalent to this memory model flag setting? 如何在.pro文件中设置GCC标志以直接处理此问题,或者Qt是否等于此内存模型标志设置?

Note: I've tried QMAKE_CXXFLAGS += -mcmodel=medium and it doesn't seem to work... 注意:我已经尝试过QMAKE_CXXFLAGS + = -mcmodel = medium,但是它似乎不起作用...

Correction: QMAKE_CXXFLAGS method appears to work. 更正:QMAKE_CXXFLAGS方法似乎可以工作。 Error returned was actually a hardware memory bus error. 返回的错误实际上是硬件内存总线错误。

QMAKE_CXXFLAGS += -mcmodel=medium

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM