Martin Lemieux writes:
1) You describe to much path information in the #include directive in
simple_ls.cpp . Like the Boost's .hpp, just start with "boost/(...).hpp".
I fixed the path information in the #include directive to be "boost/filesystem/...
2) Then make sure your compiler command line at least mention
"-I /user/local/include" or "-I $(INC)" where INC
~includes~ "/user/local/include".
I get further, here is the new AIX compiler error:
xlc++ -o simple_ls simple_ls.cpp -I /usr/local/include
ld: 0711-317 ERROR: Undefined symbol: .boost::filesystem::initial_path()
ld: 0711-317 ERROR: Undefined symbol: boost::filesystem::native(const std::basic_string&)
ld: 0711-317 ERROR: Undefined symbol: .boost::filesystem::path::path(const char*,bool(*)(const std::basic_string&))
ld: 0711-317 ERROR: Undefined symbol: .boost::filesystem::system_complete(const boost::filesystem::path&)
ld: 0711-317 ERROR: Undefined symbol: .boost::filesystem::exists(const boost::filesystem::path&)
ld: 0711-317 ERROR: Undefined symbol: .boost::filesystem::path::native_file_string() const
ld: 0711-317 ERROR: Undefined symbol: .boost::filesystem::is_directory(const boost::filesystem::path&)
ld: 0711-317 ERROR: Undefined symbol: .boost::filesystem::path::native_directory_string() const
ld: 0711-317 ERROR: Undefined symbol: .boost::filesystem::path::leaf() const
ld: 0711-317 ERROR: Undefined symbol: .boost::filesystem::detail::dir_itr_init(boost::shared_ptrboost::filesystem::detail::dir_itr_imp&,const boost::filesystem::path&)
ld: 0711-317 ERROR: Undefined symbol: .boost::filesystem::detail::dir_itr_dereference(const boost::shared_ptrboost::filesystem::detail::dir_itr_imp&)
ld: 0711-317 ERROR: Undefined symbol: .boost::filesystem::detail::dir_itr_increment(boost::shared_ptrboost::filesystem::detail::dir_itr_imp&)
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
2a) On AIX, look inside your makefile.
What am I looking for?
[...] MS Visual C++ 6
generates the following similar error when attempting to compile
simple_ls.cpp
c:\boost\include\boost-1_32\boost\filesystem\operations.hpp(18) : fatal
error C1083: Cannot open include file: 'boost/filesystem/path.hpp': No such file or directory
2b) On MSDEV6, add "c:\boost\include\boost-1_32" in your project settings. More specifically in the "C++" tab, under "Preprocessor" category (drop-down list), and at "Additional include directories:".
I did this and I can now build, but I get a linker error:
LINK : fatal error LNK1104: cannot open file "libboost_filesystem-vc6-sgd-1_32.lib"
Thanks.