Problem using Boost Filesystem with Clang

Hi,

not sure if this is the right place, but I am experiencing a problem using clang++ (3.9.1) with Boost Filesystem.

I have this simple program:

I solved the problem, looks like the problem is libc++ , compiling with "-stdlib=libstdc++” solve the problem.

Any reason why? Is libc++ missing something?

Thanks.
Simone

The more likely explanation is that the Boost libraries you are linking with were built against libstdc++.
libc++ and libstdc++ are not designed to be binary-compatible, so, if your program ends up encountering one form of a class (either the libc++ or libstdc++ one) while expecting the other one, then you would experience breakage.

– HT