# Error: Instruction is too long.

**URL:** https://discourse.cmake.org/t/error-instruction-is-too-long/15300
**Category:** Usage
**Tags:** gen:makefiles
**Created:** [November 13, 2025, 3:36am UTC](https://discourse.cmake.org/t/error-instruction-is-too-long/15300 "2025-11-13T03:36:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![wild.boy](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/w/fbc32d/32.png) [@wild.boy](https://discourse.cmake.org/u/wild.boy)
#### Post date: [November 13, 2025, 3:36am UTC](https://discourse.cmake.org/t/error-instruction-is-too-long/15300/1 "2025-11-13T03:36:17Z")

</div>

In CMake, if the link command becomes excessively long due to the presence of too many executable files during the linking process, what methods can be used to solve this problem?

![](https://discourse.cmake.org/uploads/default/original/2X/8/894cf0a6b535582d84428bac0175768d6fe40d60.png)

---

<div class="post-metadata">

### Author: ![codeling](https://discourse.cmake.org/user_avatar/discourse.cmake.org/codeling/32/1700_2.png) [@codeling](https://discourse.cmake.org/u/codeling)
#### Post date: [November 15, 2025, 6:48am UTC](https://discourse.cmake.org/t/error-instruction-is-too-long/15300/2 "2025-11-15T06:48:17Z")

</div>

Not sure about your specific case, but when I get command line too long errors, it typically helps to keep the paths (esp. build directory) short. As far as I know this problem typically only occurs on Windows; I’ve worked on projects where the recommendation was to keep build folder path lengths at or below 10 characters (e.g `C:/pro/bld`)
