0

I've imported the boost library files into my project, the issue is VS studio is not recognizing the files based on the default include directory locations. I can go into properties->config properties->C/C++->General->add include directories ... but it is a pain to do so for so many directories.

VS Code tells me to install vcpkg ... what's the easiest means of including the dependencies without reconfiguring directory settings?

ie: Using this default location for all boost files.

#include <boost/math/special_functions/bessel.hpp>
  • Have you tried creating an environment variable, like `set BOOST_INCLUDE_DIR=c:\your_boost_header_directory\boost` and specify it as one of the include directories by using `$(BOOST_INCLUDE_DIR)`? – PaulMcKenzie Sep 23 '19 at 19:58
  • Have a look at the answer [here](https://stackoverflow.com/questions/45974108/how-to-add-boost-library-1-65-or-1-64-to-visual-studio-2017-project/45975278#45975278) – kenba Sep 24 '19 at 07:10
  • Use the environment variable. The convention is to use $(BOOST_ROOT) and for the libs, the likes of $(BOOST_ROOT)/stage/lib. With BOOST_ROOT you can move all your projects, or not, to the next versions as they come out by changing the environment variable.For instance, I have `c:\cpp\boost_68_0` and `c:\cpp\boost_71_0`. For what ever reason I can move back to 68 if I need to. – lakeweb Sep 24 '19 at 19:44
  • ... and then add the subfolder name to your include statment as in `#include `... Welcome to c++, where typing verbose declarations happens hundreds of times a day. – Michaël Roy Sep 25 '19 at 00:14

0 Answers0