jbisa
jbisa

Reputation: 141

Importing Dlls in Visual Studio

I am able to create Dlls and am able to access their header files by manually adding the file path of the .lib file to Project Properties -> VC++ Directories -> Library Directories as well as Proj Properties -> C/C++ -> Additional Include Directories. Everything works properly when I do this, BUT every time I open my project on a new machine I have to manually change all of these paths.

I tried setting them to relative paths instead (i.e. ..\ProjectName\Debug) but this did not work. Is there any way to include the necessary library files in my project so that the project will work automatically no matter which machine it is on?

Upvotes: 0

Views: 818

Answers (1)

LihO
LihO

Reputation: 42133

Relative paths should be fine. It didn't work for you because you set incorrect paths I guess.

If .. confuses you and you are not sure what directory it refers to, you can use macros that are defined within Visual Studio IDE like $(SolutionDir) or $(ProjectDir). Note that these macros include / at the end so when you specify path by using them it looks like this: $(SolutionDir)dep/include.

Hope this helps.

Upvotes: 1

Related Questions