Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Dmitri on September 29, 2017, 09:54:24 pm

Title: Unable to compile big projects with C::B & mingw-64
Post by: Dmitri on September 29, 2017, 09:54:24 pm
Is this even possible to compile projects with huge amount of source files?
I have ~1000 source files in my project (static library) and it looks like compiler (actually, linker) is unable to execute a command with such large command-line arguments list.
As a result, I have a list with size of 44k characters (and, according to MS docs, there's a limit with 32k characters for command-line arguments on Windows).
I heard Visual Studio uses such called "response file" to resolve this problem.
Is this possible to do anything with this problem in Code::Blocks?

I'm using
Winows 10 64-bit
Code::Blocks 11176
mingw-64 v5.0.2
Title: Re: Unable to compile big projects with C::B & mingw-64
Post by: oBFusCATed on September 29, 2017, 10:16:24 pm
It is not possible at the moment.
The only workaround available is to split your project in multiple static or shared libraries which you link in the final binary.

Another option is to try to redo your project in the cmake build system and see if can handle this problem.
Cmake could generate code::blocks project and it is relatively well integrated, so it works relatively well with cmake generated projects.
Title: Re: Unable to compile big projects with C::B & mingw-64
Post by: ordak on October 03, 2017, 06:59:33 pm
Hi,

Just a thought. Can OP use "regular expressions" to send file names to compiler like this :

path/s1.c
path/s2.c

to:

path/*.c
Title: Re: Unable to compile big projects with C::B & mingw-64
Post by: stahta01 on October 03, 2017, 07:08:15 pm
Hi,

Just a thought. Can OP use "regular expressions" to send file names to compiler like this :

path/s1.c
path/s2.c

to:

path/*.c

Not likely to work.

Tim S.
Title: Re: Unable to compile big projects with C::B & mingw-64
Post by: Ronnachai on October 16, 2017, 12:44:08 pm
This is how to fix it. Featured Post