mingw“太多部分”在QT中编译大型标头文件时错误
我试图编译exprtk.hpp文件( https://exprtk.codeplex.com/ ) 491_32)在QT(Win7)上。 在编译期间,我给出了此错误消息:
debug\main.o:-1: error: too many sections (35325)
我已经注意到Exprtk.hpp文件很大(> 32000行)。 我一直在尝试在编译器上进行优化标志,但这对Eighter没有帮助。 如果有人帮助我,我会很感激... 问候,
I was trying to compile exprtk.hpp file (https://exprtk.codeplex.com/) with mingw32(491_32) on Qt (win7).
During compilation, I give this error message:
debug\main.o:-1: error: too many sections (35325)
I've been noticed that the exprtk.hpp file is huge (>32000 lines).
I've been trying optimization flags on compiler but It didn't help eighter.
I'll be appreciated if somebody help me...
Regards,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以通过添加汇编标志
-flto -wl,-allow-multiple-definition
,您可以添加-fuse-linker-plugin
-wa,-mbig,-mbig -OBJ
在x86/32bits
架构上不起作用(仅x64
)You can by adding the compilation flags
-flto -Wl,-allow-multiple-definition
and you can add-fuse-linker-plugin
-Wa,-mbig-obj
do not work onx86/32bits
architecture (onlyx64
)如此巨大的仅标头代码已经很糟糕,我宁愿使用另一个库,例如 muparser 。
您的问题已经在其他线程中进行了讨论,例如 this 。
Such huge header-only code is already bad design, i'd rather recommend to use another library, like muParser.
Your problem was already discussed in other threads, like this.