0

Note: this is not a question on how to solve the error, but how it knows the boost file name.

I'm writing a C++ program using Boost's thread library, so in one of my cpp file I put

#include <boost/thread.hpp>

Since thread is not a boost module that only including header files will do, naturally, Visual Studio is looking for a library.

However, I always thought which library to link, is specified in Project > Properties > Linker > Input > Additional Dependencies, and the paths are defined at Project > Properties > Linker > General > Additional Library Directories. How could Visual Studio knows the exact name of the boost lib file?

I'm using Visual Studio 2013 on Windows 7.

athos
  • 6,120
  • 5
  • 51
  • 95
  • 1
    ***How could Visual Studio knows the exact name of the boost lib file?*** There is a #pragma comment( lib libraryname) statement in the headers. That specifies the exact name. – drescherjm Nov 05 '16 at 12:26
  • 2
    It's because boost uses [Visual Studio auto-linking](https://msdn.microsoft.com/en-us/library/bx5yfk7t.aspx). See [How boost auto-linking makes choice?](http://stackoverflow.com/questions/22805082/how-boost-auto-linking-makes-choice). – kenba Nov 05 '16 at 12:28

0 Answers0