It looks like you have different versions of g++ installed, and maybe your program can not find the 3.4.0?
I would probably run update-alternatives --config gcc
to be sure to run the g++ version required by your program.
This link maybe useful to you:
also
The last version of OF is 0.9