You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -22,7 +22,7 @@ The `/IMPLIB` option overrides the default name for the import library that LINK
22
22
-[EXPORTS](exports.md) statement in a .def file
23
23
- An [/EXPORT](export-exports-a-function.md) specification in a LINK command
24
24
25
-
LINK ignores `/IMPLIB`/ when an import library is not being created. If no exports are specified, LINK does not create an import library. If an export file is used in the build, LINK assumes that an import library already exists and does not create one. For information on import libraries and export files, see [LIB Reference](lib-reference.md).
25
+
LINK ignores `/IMPLIB` when an import library is not being created. If no exports are specified, LINK does not create an import library. If an export file is used in the build, LINK assumes that an import library already exists and does not create one. For information on import libraries and export files, see [LIB Reference](lib-reference.md).
26
26
27
27
### To set this linker option in the Visual Studio development environment
Copy file name to clipboardExpand all lines: docs/build/reference/link-repro-full-path-rsp.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,9 @@ This flag was introduced in Visual Studio 2022 version 17.11.
17
17
18
18
## Remarks
19
19
20
-
The *`filename`* argument specifies the name of the response file to create. The linker will write the fully qualified paths of all input files to this file. The file will be created in the current working directory unless a full path is specified. The *`filename`* must not exceed `MAX_PATH` (260) characters.
20
+
The *`filename`* argument specifies the name of the response file to create. Must not exceed `MAX_PATH` (260) characters.
21
+
22
+
Rather than generate a full link repro like `/LINKREPRO`, which copies all the files to a directory and creates 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
23
22
24
For example, given:
23
25
- a directory `c:\temp\test` that contains the files `test.cpp`, `f1.cpp`, `f2.cpp`
Copy file name to clipboardExpand all lines: docs/build/reference/linking.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ The `arguments` include options and filenames and can be specified in any order.
36
36
37
37
On the command line, an option consists of an option specifier, either a dash (`-`) or a forward slash (`/`), followed by the name of the option. Option names can't be abbreviated. Some options take an argument, specified after a colon (`:`). No spaces or tabs are allowed within an option specification, except within a quoted string in the `/COMMENT` option. Specify numeric arguments in decimal or C-language notation. Option names and their keyword or filename arguments aren't case sensitive, but identifiers as arguments are case sensitive.
38
38
39
-
To pass a file to the linker, specify the filename on the command line after the `link.exe` command. You can specify an absolute or relative path with the filename, and you can use wildcards in the filename. The filename must not contain more than`MAX_PATH` (260) characters. If you omit the dot (`.`) and filename extension, the linker assumes an extension of `.obj` to find the file. The linker doesn't use filename extensions or the lack of them to make assumptions about the contents of files. It determines the type of file by examining it, and processes it accordingly.
39
+
To pass a file to the linker, specify the filename on the command line after the `link.exe` command. You can specify an absolute or relative path with the filename, and you can use wildcards in the filename. The filename must not exceed`MAX_PATH` (260) characters. If you omit the dot (`.`) and filename extension, the linker assumes an extension of `.obj` to find the file. The linker doesn't use filename extensions or the lack of them to make assumptions about the contents of files. It determines the type of file by examining it, and processes it accordingly.
40
40
41
41
The linker returns zero for success (no errors). Otherwise, it returns the error number that stopped the link. For example, if the linker generates `LNK1104`, the linker returns 1104. Accordingly, the lowest error number returned on an error by the linker is 1000. A return value of 128 represents a configuration problem with either the operating system or a .config file; the loader didn't load either `link.exe` or `c2.dll`.
42
42
@@ -46,7 +46,7 @@ You can pass command-line arguments to `link.exe` in the form of a command file.
46
46
47
47
> `link @commandfile`
48
48
49
-
The *`commandfile`* is the name of a text file. No space or tab is allowed between the at sign (**\@**) and the filename. There's no default extension; you must specify the full filename, including any extension. Wildcards can't be used. You can specify an absolute or relative path with the filename. Must not contain more than`MAX_PATH` (260) characters. The linker doesn't use an environment variable to search for the file.
49
+
The *`commandfile`* is the name of a text file. No space or tab is allowed between the at sign (**\@**) and the filename. There's no default extension; you must specify the full filename, including any extension. Wildcards can't be used. You can specify an absolute or relative path with the filename. Must not exceed`MAX_PATH` (260) characters. The linker doesn't use an environment variable to search for the file.
50
50
51
51
In the command file, arguments are separated by spaces or tabs (as on the command line) and by newline characters.
Copy file name to clipboardExpand all lines: docs/build/reference/order-put-functions-in-order.md
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ The **`/ORDER`** compiler option allows you to optimize your program's paging be
24
24
25
25
When you compile your source code into an object file, you can tell the compiler to put each function into its own section, called a *COMDAT*, by using the [/Gy (Enable function-level linking)](gy-enable-function-level-linking.md) compiler option. The **`/ORDER`** linker option tells the linker to place COMDATs into the executable image in the order you specify.
26
26
27
-
To specify the COMDAT order, create a *response file*, a text file that lists each COMDAT by name, one per line, in the order you want them to be placed by the linker. Pass the name of this file as the *filename* parameter of the **`/ORDER`** option. For C++ functions, the name of a COMDAT is the decorated form of the function name. Use the undecorated name for C functions, `main`, and for C++ functions declared as `extern "C"`. Function names and decorated names are case sensitive. For more information on decorated names, see [Decorated Names](decorated-names.md).
27
+
To specify the COMDAT order, create a *response file*, a text file that lists each COMDAT by name, one per line, in the order you want them to be placed by the linker. Pass the name of this file as the *`filename`* parameter of the **`/ORDER`** option. For C++ functions, the name of a COMDAT is the decorated form of the function name. Use the undecorated name for C functions, `main`, and for C++ functions declared as `extern "C"`. Function names and decorated names are case sensitive. For more information on decorated names, see [Decorated Names](decorated-names.md).
28
28
29
29
To find the decorated names of your COMDATs, use the [DUMPBIN](dumpbin-reference.md) tool's [/SYMBOLS](symbols.md) option on the object file. The linker automatically prepends an underscore (**\_**) to function names in the response file unless the name starts with a question mark (**?**) or at sign (**\@**). For example, if a source file, example.cpp, contains functions `int cpp_func(int)`, `extern "C" int c_func(int)` and `int main(void)`, the command `DUMPBIN /SYMBOLS example.obj` lists these decorated names:
30
30
@@ -40,17 +40,15 @@ In this case, specify the names as `?cpp_func@@YAHH@Z`, `c_func`, and `main` in
40
40
41
41
If more than one **`/ORDER`** option appears in the linker options, the last one specified takes effect.
42
42
43
-
The **`/ORDER`** option disables incremental linking. You may see linker warning [LNK4075](../../error-messages/tool-errors/linker-tools-warning-lnk4075.md) when you specify this option if incremental linking is enabled, or if you have specified the [/ZI (Incremental PDB)](z7-zi-zi-debug-information-format.md) compiler option. To silence this warning, you can use the [/INCREMENTAL:NO](incremental-link-incrementally.md) linker option to turn off incremental linking, and use the [/Zi (Generate PDB)](z7-zi-zi-debug-information-format.md) compiler option to generate a PDB without incremental linking.
43
+
The **`/ORDER`** option disables incremental linking. You may see linker warning [LNK4075](../../error-messages/tool-errors/linker-tools-warning-lnk4075.md) when you specify this option if incremental linking is enabled, or if you have specified the [`/ZI` (Incremental PDB)](z7-zi-zi-debug-information-format.md) compiler option. To silence this warning, you can use the [`/INCREMENTAL:NO]`(incremental-link-incrementally.md) linker option to turn off incremental linking, and use the [`/Zi` (Generate PDB)](z7-zi-zi-debug-information-format.md) compiler option to generate a PDB without incremental linking.
44
44
45
45
> [!NOTE]
46
-
> LINK cannot order static functions because static function names are not public symbol names. When **`/ORDER`** is specified, linker warning [LNK4037](../../error-messages/tool-errors/linker-tools-warning-lnk4037.md) is generated for each symbol in the order response file that is either static or not found.
46
+
> LINK cannot order static functions because static function names are not public symbol names. When **`/ORDER`** is specified, linker warning [`LNK4037`](../../error-messages/tool-errors/linker-tools-warning-lnk4037.md) is generated for each symbol in the order response file that is either static or not found.
47
47
48
48
### To set this linker option in the Visual Studio development environment
49
49
50
50
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).
The path and file name for the `.pdb` file. The *`pdb_file_name`* must not exceed `MAX_PATH` (260) characters.
18
18
19
19
## Remarks
20
20
21
21
Use this option to provide an alternate location for the Program Database (`.pdb`) file in a compiled binary file. Normally, the linker records the location of the `.pdb` file in the binaries that it produces. You can use this option to provide a different path and file name for the `.pdb` file. The information provided with `/PDBALTPATH` does not change the location or name of the actual `.pdb` file; it changes the information that the linker writes in the binary file. This enables you to provide a path that is independent of the file structure of the build computer. Two common uses for this option are to provide a network path or a file that has no path information.
22
22
23
-
The value of *pdb_file_name* can be an arbitrary string, an environment variable, or **%_PDB%**. The linker will expand an environment variable, such as **%SystemRoot%**, to its value. The linker defines the environment variables **%_PDB%** and **%_EXT%**. **%_PDB%** expands to the file name of the actual `.pdb` file without any path information and **%_EXT%** is the extension of the generated executable.
23
+
The value of *`pdb_file_name`* can be an arbitrary string, an environment variable, or `%_PDB%`. The linker will expand an environment variable, such as `%SystemRoot%`, to its value. The linker defines the environment variables `%_PDB%` and **%_EXT%**. `%_PDB%` expands to the file name of the actual `.pdb` file without any path information and `%_EXT%` is the extension of the generated executable.
0 commit comments