Skip to content

Commit 3669e6f

Browse files
authored
Merge pull request #5593 from MicrosoftDocs/main
6/11/2024 AM Publish
2 parents 7b15fae + fc7fbc7 commit 3669e6f

File tree

3 files changed

+51
-2
lines changed

3 files changed

+51
-2
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
description: "Learn more about: /LINKREPROFULLPATHRSP (Generate file containing absolute paths of linked files)"
3+
title: "/LINKREPROFULLPATHRSP (Generate file containing absolute paths of linked files)"
4+
ms.date: 06/10/2024
5+
f1_keywords: ["VC.Project.VCLinkerTool.LinkReproFullPathRSP", "/LINKREPROFULLPATHRSP"]
6+
helpviewer_keywords: ["/LINKREPROFULLPATHRSP linker option", "-LINKREPROFULLPATHRSP linker option", "LINKREPROFULLPATHRSP linker option"]
7+
---
8+
# `/LINKREPROFULLPATHRSP` (Generate file containing absolute paths of linked files)
9+
10+
Generates a response file (.RSP) containing the absolute paths of all the files the linker took as input.
11+
12+
This flag was introduced in Visual Studio 2022 version 17.11.
13+
14+
## Syntax
15+
16+
> **`/LINKREPROFULLPATHRSP:filename`**
17+
18+
## Remarks
19+
20+
Rather than generating a full link repro like `/LINKREPRO` which copies all the files to a directory and creating a response file with relative paths to that directory, this option writes the names of the files used during linking to the specified file.
21+
22+
For example, given:
23+
- a directory `c:\temp\test` that contains the files `test.cpp`, `f1.cpp`, `f2.cpp`
24+
- the linker command line: `link f1.obj f2.obj test.obj /out:test.exe /LINKREPROFULLPATHRSP:test.rsp`
25+
The linker produces `test.rsp` containing the following lines to reflect the fully qualified paths of the input files:
26+
27+
```cmd
28+
"c:\temp\test\f1.obj"
29+
"c:\temp\test\f2.obj"
30+
"c:\temp\test\test.obj"
31+
```
32+
33+
### To set this linker option in the Visual Studio development environment
34+
35+
1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
36+
1. Select the **Configuration Properties** > **Linker** > **Command Line** property page.
37+
1. Enter *`/LINKREPROFULLPATHRSP:file.rsp`* into **Additional Options**. Choose **OK** or **Apply** to apply the change.
38+
39+
### To set this linker option programmatically
40+
41+
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.AssemblyDebug%2A>.
42+
43+
## See also
44+
45+
[MSVC linker reference](linking.md)\
46+
[MSVC linker options](linker-options.md)

docs/build/reference/linker-options.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "MSVC Linker options"
33
description: "A list of the options supported by the Microsoft LINK linker."
4-
ms.date: 01/08/2024
4+
ms.date: 06/03/2024
55
f1_keywords: ["link"]
66
helpviewer_keywords: ["linker [C++]", "linker [C++], options listed", "libraries [C++], linking to COFF", "LINK tool [C++], linker options"]
77
---
@@ -78,6 +78,7 @@ You can use the [`comment`](../../preprocessor/comment-c-cpp.md) pragma to speci
7878
| [`/LARGEADDRESSAWARE`](largeaddressaware-handle-large-addresses.md) | Tells the compiler that the application supports addresses larger than 2 gigabytes |
7979
| [`/LIBPATH`](libpath-additional-libpath.md) | Specifies a path to search before the environmental library path. |
8080
| [`/LINKREPRO`](linkrepro.md) | Specifies a path to generate link repro artifacts in. |
81+
| [`LINKREPROFULLPATHRSP`](link-repro-full-path-rsp.md) | Generates a response file containing the absolute paths to all the files that the linker took as input. |
8182
| [`/LINKREPROTARGET`](linkreprotarget.md) | Generates a link repro only when producing the specified target.<sup>16.1</sup> |
8283
| [`/LTCG`](ltcg-link-time-code-generation.md) | Specifies link-time code generation. |
8384
| [`/MACHINE`](machine-specify-target-platform.md) | Specifies the target platform. |

docs/build/toc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ items:
628628
href: ../build/reference/ifc-map.md
629629
- name: /interface (Treat input file as a module interface unit)
630630
href: ../build/reference/interface.md
631-
- name: /internalPartition (Treat the input file as an internal partition unit.)
631+
- name: /internalPartition (Treat the input file as an internal partition unit)
632632
href: ../build/reference/internal-partition.md
633633
- name: /J (Default char type is unsigned)
634634
href: ../build/reference/j-default-char-type-is-unsigned.md
@@ -640,6 +640,8 @@ items:
640640
href: ../build/reference/kernel-create-kernel-mode-binary.md
641641
- name: /link (Pass options to linker)
642642
href: ../build/reference/link-pass-options-to-linker.md
643+
- name: /LINKREPROFULLPATHRSP (Generate file containing absolute paths of linked files)
644+
href: ../build/reference/link-repro-full-path-rsp.md
643645
- name: /LN (Create MSIL module)
644646
href: ../build/reference/ln-create-msil-module.md
645647
- name: /MD, /MT, /LD (Use Run-time library)

0 commit comments

Comments
 (0)