Include juce_gui_basics.o: File too big file

Hi I am trying to compile it using codeblock but I am getting this error. include juce_gui_basics.o: File too big file

any help please?

What operating system are you using?
What compiler within Code::Blocks are you using?

If you are on Windows the standard answer to that question, though somewhat unsatisfying, is usually: Why are you using Code::Blocks? Visual Studio Community is free and is a much more capable IDE.

The compiler I used is mingw-64 using windows 10. I don’t want to used visual studio. it is because the header files I added are compatible in gcc/g++

Please help me thanks a lot!

Does your version of mingw support the -Wa,-mbig-obj option?

I am not sure what version must be with that option but I am using gcc version 8.1.0

@dsese1234 I saw that you liked this post:

Did you actually add -Wa,-mbig-obj to the “Extra Compiler Flags” of the “Code::Blocks (Windows)” exporter in Projucer?

Hi McMartin,

I added those flag to codeblocks perhaps the gcc version is the issue.

The flag is -Wa,-mbig-obj. You can’t drop the -Wa, part, otherwise the flag is not understood properly.

compiling takes so long and still getting the error. hmmm any suggestion please?

any update on this thread?

@dsese1234 I already gave you the solution: adding -Wa,-mbig-obj to the compiler flags. If you still have an issue, please explain exactly what you are doing and what error you are getting.

it takes so long and it does not compile

What does this mean?
Does it get stuck and hang?
Does it fail and output an error? If yes, then please give us the complete error message.

In any case, please also give us the complete compiler command line. We need to know all the flags and options that are passed to the compiler to understand what is going on.

Hi,
I have the same issue using MinGW-64. The command I have is:
cmake-build-debug --target APP -Wa,-mbig-obj
and getting the errors:
C:/MinGW-64/mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/8.1.0/…/…/…/…/x86_64-w64-mingw32/bin/as.exe: CMakeFiles\APP.dir\C_\Users\ytr16\Downloads\test1project\JuceLibraryCode\include_juce_gui_basics.cpp.obj: too many sections (49309)
C:\Users\ytr16\AppData\Local\Temp\ccgu6Ksi.s: Assembler messages:
C:\Users\ytr16\AppData\Local\Temp\ccgu6Ksi.s: Fatal error: can’t write 342 bytes to section .text of CMakeFiles\APP.dir\C_\Users\ytr16\Downloads\test1project\JuceLibraryCode\include_juce_gui_basics.cpp.obj: ‘File too big’
C:/MinGW-64/mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/8.1.0/…/…/…/…/x86_64-w64-mingw32/bin/as.exe: CMakeFiles\APP.dir\C_\Users\ytr16\Downloads\test1project\JuceLibraryCode\include_juce_gui_basics.cpp.obj: too many sections (49309)
C:\Users\ytr16\AppData\Local\Temp\ccgu6Ksi.s: Fatal error: can’t close CMakeFiles\APP.dir\C_\Users\ytr16\Downloads\test1project\JuceLibraryCode\include_juce_gui_basics.cpp.obj: File too big
mingw32-make.exe[3]: *** [CMakeFiles\APP.dir\build.make:231: CMakeFiles/APP.dir/C_/Users/ytr16/Downloads/test1project/JuceLibraryCode/include_juce_gui_basics.cpp.obj] Error 1
mingw32-make.exe[2]: *** [CMakeFiles\Makefile2:75: CMakeFiles/APP.dir/all] Error 2
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:82: CMakeFiles/APP.dir/rule] Error 2
mingw32-make.exe: *** [Makefile:117: APP] Error 2
is there anything else I can try?

Hi @poi167

Did you add -Wa,-mbig-obj to the “Extra Compiler Flags” field of the “Code::Blocks (Windows)” exporter in Projucer?

Thanks. It seems like that was the issue. Not sure why you can’t just put it as an argument when building, but it needs to be included with the cmakelists I guess.
Happy holidays.

I also have another question.
To compile a basic audio plugin template it takes roughly 15 min on my XPS 13 9365 i7-8500y 16gb. Is it normal time or something is wrong?
Kind regards,
Aleks