Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 1.7 KB

libpath-additional-libpath.md

File metadata and controls

39 lines (26 loc) · 1.7 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: /LIBPATH (Additional Libpath)
/LIBPATH (Additional Libpath)
11/04/2016
/libpath
VC.Project.VCLinkerTool.AdditionalLibraryDirectories
LIBPATH linker option
/LIBPATH linker option
Additional Libpath linker option
environment library path override
-LIBPATH linker option
library path linker option
7240af0b-9a3d-4d53-8169-2a92cd6958ba

/LIBPATH (Additional Libpath)

/LIBPATH:dir

Parameters

dir
Specifies a path that the linker will search before it searches the path specified in the LIB environment option.

Remarks

Use the /LIBPATH option to override the environment library path. The linker will first search in the path specified by this option, and then search in the path specified in the LIB environment variable. You can specify only one directory for each /LIBPATH option you enter. If you want to specify more than one directory, you must specify multiple /LIBPATH options. The linker will then search the specified directories in order.

To set this linker option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.

  2. Select the Configuration Properties > Linker > General property page.

  3. Modify the Additional Library Directories property.

To set this linker option programmatically

  • See xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.AdditionalLibraryDirectories%2A.

See also

MSVC linker reference
MSVC Linker Options