c – 在Qt中编译巨大的头文件时mingw“太多部分”错误

栏目: C++ · 发布时间: 7年前

内容简介:翻译自:https://stackoverflow.com/questions/31890021/mingw-too-many-sections-bug-while-compiling-huge-header-file-in-qt

我试图在Qt(win7)上用mingw32(491_32)编译exprtk.hpp文件( https://exprtk.codeplex.com/ ).

在编译期间,我给出了以下错误消息:

debug\main.o:-1: error: too many sections (35325)

我注意到exprtk.hpp文件很大(> 32000行).

我一直在尝试编译器上的优化标志,但它没有帮助eighter.

如果有人帮助我,我将不胜感激……

问候,

这样巨大的标题代码已经是糟糕的设计,我宁愿建议使用另一个库,如 muParser .

您的问题已在其他主题中讨论过,例如 this .

As you’ve already noticed, passing /bigobj to Microsoft’s compiler  causes it to output a munged COFF format with up to 2^31 sections,  which “should be enough for anybody.”
I’ve tested this new option with MinGW-w64 and it works. You need to  pass -Wa,-mbig-obj to gcc to opt-in to big objects (-Wa means pass  this option to the assembler). – Francis Gagné

翻译自:https://stackoverflow.com/questions/31890021/mingw-too-many-sections-bug-while-compiling-huge-header-file-in-qt


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

XForms Essentials

XForms Essentials

Micah Dubinko / O'Reilly Media, Inc. / 2003-08-27 / USD 29.95

The use of forms on the Web is so commonplace that most user interactions involve some type of form. XForms - a combination of XML and forms - offers a powerful alternative to HTML-based forms. By pro......一起来看看 《XForms Essentials》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具