Qt4 Creator/QMAKE 相当于“-mcmodel=medium” GCC 编译器设置
我正在使用 Qt Creator 为 Linux 上内存相当密集的 C++ 应用程序创建 GUI。为了使应用程序正常运行,必须在编译期间设置 -mcmodel=medium 编译器标志,否则应用程序将在执行过程中突然崩溃(尝试在没有它的情况下在 Qt 中进行编译,并且它会按预期崩溃)。如何在 .pro 文件中设置 GCC 标志来直接处理此问题,或者是否有与此内存模型标志设置等效的 Qt?
注意:我已经尝试过 QMAKE_CXXFLAGS += -mcmodel=medium 但它似乎不起作用...
更正:QMAKE_CXXFLAGS 方法似乎有效。返回的错误实际上是硬件内存总线错误。
I'm using Qt Creator to create a GUI for a fairly memory intensive C++ application on Linux. 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). 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?
Note: I've tried QMAKE_CXXFLAGS += -mcmodel=medium and it doesn't seem to work...
Correction: QMAKE_CXXFLAGS method appears to work. Error returned was actually a hardware memory bus error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)