Assuming boost is correctly configured and built on your system, there will be a location where the hub of the boost include root is located. Ex: if you downloaded and built boost in c:\Stuff\boost_1_70_0, then within that folder will be the hub of the boost include set, c:\Stuff\boost_1_70_0\boost, and it contains all of the boost headers.
boost is referenced by amending the include path to provide access to the boost include hub; not to provide access to the top-most headers in the hub. Similar to openssl, boost prefaces all of their header includes in their own headers, with boost/. The consumers of boost should do the same, Therefore, the include path must include the folder where the boost/ hub can be found. It should not include the boost/ hub itself as part of the path.
Ex: This is correct
g++ -Ic:\Stuff\boost_1_70_0 -o main main.cpp
This, on the other hand is wrong:
g++ -Ic:\Stuff\boost_1_70_0\boost -o main main.cpp
With the former, when code includes:
#include <boost/asio.hpp>
the include path is searched, and the file is found. Further, within that header, when the compiler see this:
#include <boost/asio/associated_allocator.hpp>
it can still resolve correctly, because dropping that "thing" on the end of one of the folders in the include path works.
Now, consider the wrong case. What happens if you configure the include path to accidentally specify the boost/root hub itself? Well, now you can do this:
#include <asio.hpp>
But as soon as the preprocessor starts in on that header it will see:
#include <boost/asio/associated_allocator.hpp>
Um.. woops. The pre-processor will look for this and never find it
Summary
When using boost headers in your source, you always refer to them with the boost hub preamble:
#include <boost/headername.hpp>
and always include the folder where the boost/ hub is located in your build configuration as an amended include path; not full path including the boost/ hub.
C:\Users\Owner\Downloads\boost_1_70_0\boost? Is there a sub-directory namedboost?-IC:\Users\Owner\Downloads\boost_1_70_0. All the boost headers look for the boost root as part of their specified file name. Likewise, your source shoud do the same, and thus your source is wrong. it should say#include <boost/type_index.hpp>. Fix your include path, preface all your source file references to boost headers withboost/, and you should be good to go.C:\Users\Owner\Downloads\boost_1_70_0\boostwas; you showed the content ofC:\Users\Owner\Downloads\boost_1_70_0. There's a reason he asked, and it directly relates to my prior comment.