I am working on a code base that uses boost libraries. But I recently had problems creating a database on a new user machine. I was able to solve the problem as follows. Here's what the build system looks like:
/root /SubModules_with_Makefiles_and_Code /thirdparty/boost
The submodule code will refer to the forced material, for example (for example):
#include <boost/property_tree/ptree.hpp>
And the makefile subcomplex will create code such as this (for example):
g++ -c -o code.o code.cpp -I/root/thirdparty/boost
Our third-party boost library is version 1.37. However, some modules began to use later versions of boost. This problem was masked because the machines on which these modules were created contain boost 1.41 installed in / usr / include / boost.
The problem arose because the new user machine did not have a 1.41 upgrade installed in / usr / include. Ideally, I would like g ++ to look for promotion in a third-party directory and nowhere else. Thus, we can more precisely control how the code base is created.
-I <dir> puts <dir> before the system will turn on during the search, but still the system includes it, and that is where later versions of boost can be installed depending on the machine. I can stifle a look at the system, but that would be a real pain.
In any case, a sensible way to do this, except by replacing:
#include <boost/something.hpp>
to
#include <thirdparty/boost/something.hpp>
? If this helps, I use gnu make 3.81 and g ++ 4.4.5 on redhat linux.