Once C++ Boost is installed on a machine, the fastest way to test the installation is to use some of the libraries from it in test C++ programs and try to build them. The following two programs can be used for this purpose:
first.cpp
[cpp]#include
#include
int main()
{
boost::any a(5);
a = 7.67;
std::cout<(a)< }[/cpp]
Build this program using:

sh# g++ -o first first.cpp

The second example needs to be linked to a library file.
second.cpp
[cpp]#include
#include
namespace bfs=boost::filesystem;
int main()
{
bfs::path p(“second.cpp”);
if(bfs::exists(p))
std::cout< }[/cpp]

sh# g++ -o second second.cpp -lboost_filesystem

If the above two programs build and run with out any problems, then boost is installed and working properly on your system.