Adam Lee
Adam Lee

Reputation: 25748

How to make additional library directories relative?

I am using Visual Studio to add some additional library directories. However the directories added are absolute paths, I am wondering how to make it relative?

Upvotes: 0

Views: 865

Answers (2)

herohuyongtao
herohuyongtao

Reputation: 50667

The best way to do this is to take full use of Macros that are related to your Visual Studio project/solution. Particularly, you want to use $(SolutionDir) and $(ProjectDir). For example, if the library is located under your solution folder named libFolder, then you can just add the following path to your library directories (Include/Library/...)

$(SolutionDir)\libFolder

Further reading: check out here to see more info about Visual Studio macros.

Upvotes: 2

Digital_Reality
Digital_Reality

Reputation: 4738

From your current project path you can use below:

Project Properties -> Linker -> General -> Additional Library directories

..\..\Folder\Lib;

Upvotes: 1

Related Questions