Reputation: 11399
In a different project which I unfortunately deleted, I was able to use Boost. I added the libaries in the project configuration, and then I declared
#include <boost/lexical_cast.hpp>
Everything was fine.
Now in my new project I am getting the error
boost/lexical_cast.hpp not found
I have followed the instruction on http://www.boost.org/doc/libs/1_55_0/more/getting_started/windows.html#link-from-within-the-visual-studio-ide
I have added my path to boost_1_58_0\libs to Linker->General->Additional Libraries.
However, now the above error is thrown by the compiler.
Does anybody have any idea what I might have done wrong? I have not changed anything in regards of Boost.
Upvotes: 0
Views: 5654
Reputation: 385204
You're reading the wrong chapter.
That chapter is about linking Boost object files to your project, but Boost.LexicalCast is a header-only library, for which the introductory IDE set up instructions (on the same page) are relevant.
Upvotes: 2
Reputation: 11399
I found the solution. The instructions on the Boost website were wrong.
The ones found here are correct: https://elektron9.wordpress.com/2014/09/10/configuring-c-boost-libraries-for-visual-studio/
I had to do the following additionally to make it work:
C/C++ All Options Additional Include libraries Add path to Boost there (not to Boost/lib or Boost/libs as the official docu says!)
Upvotes: -1