Condividi tramite


VCLinkerTool.AdditionalLibraryDirectories Property

Definition

Gets or sets one or more additional paths (configuration specific) to search for libraries.

public:
 property System::String ^ AdditionalLibraryDirectories { System::String ^ get(); void set(System::String ^ value); };
public:
 property Platform::String ^ AdditionalLibraryDirectories { Platform::String ^ get(); void set(Platform::String ^ value); };
[System.Runtime.InteropServices.DispId(9)]
public string AdditionalLibraryDirectories { [System.Runtime.InteropServices.DispId(9)] get; [System.Runtime.InteropServices.DispId(9)] set; }
[<System.Runtime.InteropServices.DispId(9)>]
[<get: System.Runtime.InteropServices.DispId(9)>]
[<set: System.Runtime.InteropServices.DispId(9)>]
member this.AdditionalLibraryDirectories : string with get, set
Public Property AdditionalLibraryDirectories As String

Property Value

A string representing the path name.

Attributes

Examples

The following example modifies the linker's AdditionalLibraryDirectories property in the integrated development environment (IDE):

' Macro code.  
' Before running, load a Visual C++ project and add a reference to   
' Microsoft.VisualStudio.VCProjectEngine  
Imports EnvDTE  
Imports EnvDTE80  
Imports System.Diagnostics  
Imports Microsoft.VisualStudio.VCProjectEngine  

Public Module Module1  
    Sub Test()  
        Dim prj As VCProject  
        Dim cfgs, tools As IVCCollection  
        Dim cfg As VCConfiguration  
        Dim tool As VCLinkerTool  

        prj = DTE.Solution.Projects.Item(1).Object  
        cfgs = prj.Configurations  
        cfg = cfgs.Item(1)  
        tool = cfg.Tools("VCLinkerTool")  
        MsgBox("Additional Lib Directory: " & _  
        tool.AdditionalLibraryDirectories)  
        tool.AdditionalLibraryDirectories = "c:\temp"  
        MsgBox("Additional Lib Directory: " & _  
        tool.AdditionalLibraryDirectories)  
    End Sub  
End Module  

Remarks

AdditionalLibraryDirectories exposes the functionality of the linker's /LIBPATH (Additional Libpath) option and the librarian's Managing a Library option.

An example of a valid path name is "c:\additionaldirs." Use semicolons to delimit a list of more than one path.

Applies to