dagi12
dagi12

Reputation: 459

How to shorten linking process in Visual Studio

I'm working with allegro library in Visual Studio C++. And every time I'm creating project I must go through following proccess.

  1. Right click your project under Solution Explorer on the right, then select Properties.
  2. Under Configuration Properties->C/C++->General, enter c:\allegro\include in Additional Include Directories.
  3. Under Configuration Properties->Linker->General, enter c:\allegro\lib in Additional Library Directories.
  4. Under Configuration Properties->Linker->Input, append allegro-5.0.x-monolith-md-debug.lib to Additional Dependencies.
  5. Under Configuration Properties->Debugging, enter PATH=c:\allegro\bin;%PATH% in Environment.
  6. Click Apply.

And similarly with Release mode.

I'm using VC for a week so I'm not aware with that sort of stuff and it is really complicated for me.

Is there a way to link this libraries automatically to every project.

Or maybe a better idea is to store this "linking settings" in some kind of build configuration that I can simply apply to solution or project.

Anything that making previously described step by step process shorten or unnecessary would be incredibly helpful.

Sorry for my english I'm not a native speaker.

Upvotes: 0

Views: 160

Answers (2)

Casey
Casey

Reputation: 10936

Use Property Sheets. This question is very similar to ones I've already answered..several times. So I'll just link them here in chronological order:

https://stackoverflow.com/a/10003996/421178

https://stackoverflow.com/a/13734023/421178

https://stackoverflow.com/a/17755536/421178

The last link describes the exact process for creating property sheets.

Upvotes: 2

doptimusprime
doptimusprime

Reputation: 9405

I think these settings are required for one time when creating a new project. Next time you reload the project, setting up is not required as it is already set.

Alternatively, you can write your own makefiles which will take care of linking and setup PATH variable and use Visual Studio command prompt. You need to write makefile once. Everytime, you call make, it will link with appropriate library.

Upvotes: 0

Related Questions