Skip to content

Internal Builder: Cannot run program "gcc": Command line too long #1316

@fanghuaqi

Description

@fanghuaqi

Describe the bug

I have a project with a lot of c/c++ files, during link process it will show "gcc": Command line too long, I have tried with CDT Internal Builder and GNU Make Builder, this issue still exist, and I have create a simple project for you to reproduce it.

To Reproduce
Steps to reproduce the behavior:

  1. import hello-manyfiles.zip
  2. build it, it will show the error I have met.
  3. Change Properities -> C/C++ Build -> Tool Chain Editor -> Current builder to GNU Make Builder
  4. And rebuild it, the error still met

After search in the website, it seems to be a windows 32K limit for the length of the command line issue reported in https://bugs.eclipse.org/bugs/show_bug.cgi?id=72965

Is this bug still present in this release, can we use response file(https://gcc.gnu.org/wiki/Response_Files) which is supported by gcc and clang, when generate the make rule for link, just generate response file, and use the response file as link cmd input, so the lenght of cmd will be shorten.

Thanks

Version Information (please complete the following information):

  • OS and OS Version/extra details: Windows
  • Eclipse Version from Help -> About [2025.09]
  • CDT Version from Help -> About -> Installation Details -> Features tab [12.2.0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildBuild components of CDT, anything to do with running the compiler, using Make, CMake, or any builder

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions