I had to manually copy the platform folder to /usr/local/include/mongo in order to build example applications
g++ second.cpp --std=c++0x -L/usr/local/lib64 -I /usr/local/include/mongo -I /usr/local/include/ -lmongoclient -lboost_system -lboost_thread -lboost_filesystem -o second.out
In file included from /usr/local/include/mongo/client/dbclient.h:30:0,
from second.cpp:20:
/usr/local/include/mongo/pch.h:28:34: fatal error: mongo/platform/basic.h: No such file or directory
compilation terminated.