Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mingw "too many sections" bug while compiling huge header file in Qt

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,

like image 319
Mosi Avatar asked Aug 08 '15 05:08

Mosi


1 Answers

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 on x86/32bits architecture (only x64)

like image 198
UltimatePajerix Avatar answered Sep 21 '22 19:09

UltimatePajerix