Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adding a library to visual studio 2010 express

cant seem to find a definintive answer to how to add a library. theres project properties with a whole bunch of places to add filepaths but im wondering if i shouldnt be editing all of them, can someone tell me the purpose of each possible entry, if there are more, and possibly which ones i should be editing? or a handy tutoril? ill list what entries i know about. currently trying to add the Wwise library.

  1. project->project name properties->configuration properties->vc++ directories->library directories (click edit and addthe relevant filepath)

  2. project->project name properties->configuration properties->linker->general->additional library dependencies (click edit and addthe relevant filepath)

  3. project->project name properties->configuration properties->linker->input->additional dependencies (enter the names of the libraries manually)

If i go through all that i get more linker errors than i started with

like image 458
cool mr croc Avatar asked May 13 '12 11:05

cool mr croc


1 Answers

  1. Those are the directories that the linker will search for .libs that are provided with Visual Studio. Like the CRT, MFC, ATL and the Windows SDK. You don't want to tinker with that one, the default value is read from the registry and was written there by the installer. Only change if you want to link to non-standard versions of these .libs

  2. Those are the files that the linker will actually link.

  3. Those are the additional directories that the linker will search for files that were specified in bullet 2 or from #pragma comment directives in the source code. You'll only need to set this if bullet 2 didn't specify the full path of the file or the .lib file isn't present in one of the VS standard directories or the project directory. You typically put the Boost install directory there for example.

So bullet 2 is the important one, that actually specifies what will be linked. Bullet 3 just helps the linker find the file.

like image 157
Hans Passant Avatar answered Oct 27 '22 19:10

Hans Passant