Skip to content

Commit b6dc238

Browse files
Colin Robertsonjborsecnik
andauthored
Docs/corob/cpp docs 3481 d8049 (#3865)
* Add D8049 error message * Acrolinx tweak * Update toc.yml fix apparent typo in TOC Co-authored-by: Jeff Borsecnik <36546697+jborsecnik@users.noreply.github.com>
1 parent bbf2391 commit b6dc238

3 files changed

Lines changed: 27 additions & 1 deletion

File tree

docs/error-messages/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ items:
6161
href: tool-errors/command-line-error-d8045.md
6262
- name: Command-line error D8048
6363
href: tool-errors/command-line-error-d8048.md
64+
- name: Command-line error D8049
65+
href: tool-errors/command-line-error-d8049.md
6466
- name: Command-line warning D9024
6567
href: tool-errors/command-line-warning-d9024.md
6668
- name: Command-line warning D9025
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
description: "Learn about the cause and solutions for command-line error D8049"
3+
title: "Command-Line Error D8049"
4+
ms.date: 10/28/2021
5+
f1_keywords: ["D8049"]
6+
helpviewer_keywords: ["D8049"]
7+
---
8+
# Command-line error D8049
9+
10+
> cannot execute '*compiler-component*': command line is too long to fit in debug record
11+
12+
An internal length limit on debug record include paths was exceeded.
13+
14+
## Remarks
15+
16+
When the compiler creates debug records in an object file, it uses the full path for each included file. Absolute paths are recorded as specified. For relative include paths, the debug record prepends the build's current working directory to the relative path. If your build runs in a relatively deep path, the corresponding path records get longer. The total length of too many long paths can exceed the internal limits of the compiler.
17+
18+
## To resolve this issue
19+
20+
- Use shorter paths for your include and build directories. Install your library include headers in directories that have shorter paths, and use short paths to your projects' intermediate and destination build directories. IF you alias paths, use short aliases. Set `%TMP%` and `%TEMP%` to directories that have shorter paths.
21+
22+
- Optimize your include files to the minimum set required for any given source file. This method also has the advantage of speeding compilation times. If you use precompiled headers, it's important to optimize the set of headers you include in your precompiled header file. In complex solutions, it may be worthwhile to create different precompiled headers optimized for different parts of your project. If your code uses C++20, we recommend you use modules or header modules in preference to precompiled headers.

docs/error-messages/tool-errors/command-line-errors-d8000-through-d9999.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ The articles in this section provide a reference to the command-line errors and
1818
[Command-Line Error D8027](../../error-messages/tool-errors/command-line-error-d8027.md) \
1919
[Command-Line Error D8036](../../error-messages/tool-errors/command-line-error-d8036.md) \
2020
[Command-Line Error D8037](../../error-messages/tool-errors/command-line-error-d8037.md) \
21-
[Command-Line Error D8045](../../error-messages/tool-errors/command-line-error-d8045.md)
21+
[Command-Line Error D8045](../../error-messages/tool-errors/command-line-error-d8045.md) \
22+
[Command-Line Error D8048](../../error-messages/tool-errors/command-line-error-d8048.md) \
23+
[Command-Line Error D8049](../../error-messages/tool-errors/command-line-error-d8049.md)
2224

2325
## Command-line warning messages
2426

0 commit comments

Comments
 (0)