I’m trying to compile a C++ project that requires Boost. I downloaded the latest build from the web site and copied the appropriate files to the appropriate libs folder (I’m using MinGW). When I compile, I’m get this error:
In file included from main.cpp:4:0:
headers.h:59:29: fatal error: boost/foreach.hpp: No such file or directory
compilation terminated.
I can find a working copy of foreach.hpp but I shouldn’t have to move code files manually.
Solution
I had copied boost to the wrong folder.
You should make sure that your include path is set correctly. Assuming you downloaded Boost 1.47.0 your path should contain the location to your Boost installation up to the
boost_1_47_0directory, but leaving out theboostone, e.g.and not