|
1 | 1 | --- |
2 | 2 | description: "Learn more about: /IMPLIB (Name Import Library)" |
3 | 3 | title: "/IMPLIB (Name Import Library)" |
4 | | -ms.date: "11/04/2016" |
| 4 | +ms.date: 03/24/2025 |
5 | 5 | f1_keywords: ["/implib", "VC.Project.VCLinkerTool.ImportLIbrary"] |
6 | 6 | helpviewer_keywords: ["IMPLIB linker option", "/IMPLIB linker option", "-IMPLIB linker option", "import libraries, overriding default name"] |
7 | 7 | --- |
8 | 8 | # `/IMPLIB` (Name Import Library) |
9 | 9 |
|
| 10 | +## Syntax |
| 11 | + |
10 | 12 | > /IMPLIB:*filename* |
11 | 13 |
|
12 | | -## Parameters |
| 14 | +## Argument |
13 | 15 |
|
14 | 16 | *`filename`*\ |
15 | 17 | A user-specified name for the import library. It replaces the default name. Must not exceed `MAX_PATH` (260) characters. |
16 | 18 |
|
17 | 19 | ## Remarks |
18 | 20 |
|
19 | | -The `/IMPLIB` option overrides the default name for the import library that LINK creates when it builds a program that contains exports. The default name is formed from the base name of the main output file and the extension .lib. A program contains exports if one or more of the following are specified: |
| 21 | +The `/IMPLIB` option overrides the default name for the import library that LINK creates when it builds a program that contains exports. The default name is formed from the base name of the main output file and the extension `.lib`. A program contains exports if one or more of the following are specified: |
20 | 22 |
|
21 | 23 | - The [__declspec(dllexport)](../../cpp/dllexport-dllimport.md) keyword in the source code |
22 | 24 | - [EXPORTS](exports.md) statement in a .def file |
23 | 25 | - An [/EXPORT](export-exports-a-function.md) specification in a LINK command |
24 | 26 |
|
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). |
| 27 | +LINK ignores `/IMPLIB` when an import library isn't being created. If no exports are specified, LINK doesn't create an import library. If an export file is used in the build, LINK assumes that an import library already exists and doesn't create one. For information on import libraries and export files, see [LIB Reference](lib-reference.md). |
26 | 28 |
|
27 | 29 | ### To set this linker option in the Visual Studio development environment |
28 | 30 |
|
29 | 31 | 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). |
30 | | - |
31 | 32 | 1. Select the **Configuration Properties** > **Linker** > **Advanced** property page. |
32 | | - |
33 | 33 | 1. Modify the **Import Library** property. |
34 | 34 |
|
35 | 35 | ### To set this linker option programmatically |
|
0 commit comments