Home | News | Download | Packages | Forum | Wiki | Github

[solved] How to get system to see boost/filesystem for g++

(Userx) #1

Ok I am getting

[userx@void mh5000]$ g++ files.cpp options.cpp main.cpp
files.cpp:2:28: fatal error: boost/filesystem: No such file or directory
#include <boost/filesystem>

but it is installed on my system.


so Now I just need to learn how to get the compiler to see it., and what pit falls is there if someone tries to compile this on there system and get that same error?

how does one prevent such a thing?
else using this stuff seems rather useless in an open source environment that allows others to compile as opposed to having just the binary to execute.

(Userx) #2

it looks like I have to do almost absolute path to header file.

#include <boost/filesystem/path.hpp>

(Ben Hsu) #3

Hi there, don’t know if you have already solved this. But you shouldn’t need to specifically include path.hpp.

You should only need to #include <boost/filesystem.hpp>.

I don’t think they have it set up to let you do <boost/filesystem> like the STL.

The tutorial pages always include the hpp extension:

Hope that helps.