Author Topic: Unable to compile big projects with C::B & mingw-64  (Read 337 times)

Offline Dmitri

  • Single posting newcomer
  • *
  • Posts: 1
Unable to compile big projects with C::B & mingw-64
« 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
« Last Edit: September 29, 2017, 10:05:35 pm by Dmitri »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10277
Re: Unable to compile big projects with C::B & mingw-64
« Reply #1 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.
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ordak

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Unable to compile big projects with C::B & mingw-64
« Reply #2 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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5943
    • My Best Post
Re: Unable to compile big projects with C::B & mingw-64
« Reply #3 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Ronnachai

  • Single posting newcomer
  • *
  • Posts: 2
Re: Unable to compile big projects with C::B & mingw-64
« Reply #4 on: October 16, 2017, 12:44:08 pm »
This is how to fix it. Featured Post