Reputation: 4792
I'm trying to add the Boost C++ Libraries to my C++ project created with Visual Studio 2017.
I have followed the instructions here. When that didn't work I tried the advice in this post. Neither solutions worked for me.
What I have done:
boost_1_69_0-msvc-14.1-64.exe
from this precompiled boost libraries pageD:\local\boost_1_69_0
D:\local\boost_1_69_0
to Properties > VC++ Directories > Include Directories and added D:\local\boost_1_69_0\lib64-msvc-14.1
to Properties > VC++ Directories > Library DirectoriesWhen I try to build my project I get this error:
Error C1083 Cannot open include file: 'boost/regex.hpp': No such file or directory
Which points to this line of code in one of my .cpp files:
#include <boost/regex.hpp>
Upvotes: 0
Views: 1006
Reputation: 4792
Found out it was failing because I had included the same .cpp file which has the boost include into my unit test project which did NOT have the Include/Library folders set. The settings in my original question work now.
Upvotes: 0
Reputation: 131
Please go to D:\local\boost_1_69_0 folder and see if you have a sub-folder named include in there. If you do, then instead of D:\local\boost_1_69_0 you need to set D:\local\boost_1_69_0\include in Properties > VC++ Directories > Include Directories
In other words, try to find the file you are including on your hard drive. Look at the full path to the file. Compare that full path with the path you added to the list of include directories (Properties > VC++ Directories > Include Directories) concatenated with the relative path you provided just before the filename in your include directive (boost). See if the two are the same.
If that does not help, then make sure you changed list of include directories for the same build configuration as you are attempting to build (if you build Debug, make sure you changed configuration for Debug too). Since VS 2015 IDE stopped making sure the two are selected in sync, which is annoying.
Upvotes: 2
Reputation: 1
If your files are copied, then you have to compile the regular library.... If the same version of the compiler copies the machine.
Upvotes: 0