How do I include libraries to a project in Visual Studio?

A library is added in two steps

  1. Adding headers path to the project
  2. Adding .lib reference

In the first step, you must specify in the project where library headers are header. Usually, the path is specified in the project properties -> C++ -> Additional include directories, and them including files with relative paths.

In the second step you must specify in properties->linker the path where libraries (.lib) are located and the name of the library. With this Visual Studio is able to link the project properly.