我试图在 Qt (win7) 上用 mingw32(491_32) 编译 exprtk.hpp 文件 ( https://exprtk.codeplex.com/ )。 在编译过程中,我给出了这个错误信息:
debug\main.o:-1: error: too many sections (35325)
我注意到 exprtk.hpp 文件很大(>32000 行)。 我一直在尝试对编译器进行优化标志,但它并没有帮助八点。 如果有人帮助我,我将不胜感激...... 问候,
最佳答案
您可以通过添加编译标志 -flto -Wl,-allow-multiple-definition
并且可以添加 -fuse-linker-plugin
-Wa,-mbig-obj
不适用于 x86/32bits
架构(仅 x64
)
关于c++ - mingw "too many sections"错误,同时在 Qt 中编译巨大的头文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31890021/