Similar question with no real answer applicable to my case : CLICK
Question which I researched before asking here - CLICK
I'm using MinGW64
to try and compile a very large .cpp
file (>13k
lines), but I also have access to Visual Studio 2010 - if someone has a solution using that, feel free to tell me.
I've identified an error in the assembling stage -
... too many sections (33396)
C:\Users\username\AppData\Local\Temp\ccnAocvD.s: Assembler messages:
C:\Users\username\AppData\Local\Temp\ccnAocvD.s: Fatal error: can't write
CMakeFiles/source.dir/sourcecode.cpp.obj: File too big
I'm currently running the compilation with the -Os
, --param ggc-min-expand=0
, --param ggc-min-heapsize=4096
as suggested by two of my colleagues - the compilation is running way over 5 hours now.
Update:
As suggested by some people, I will just split the file into 2 source files and create a header for them - thanks.
Second Update:
Compilation hasn't finished yet(5 days !!!), even after creating a header and splitting the file into 4 smaller ones.
Final
This problem remained unresolved - even after following advice from everyone that posted I still couldn't manage to compile this.