newbie boost sample compile program
I have installed boost on both Windows and AIX and get the same problem when I try to compile the simple_ls.cpp program that boost provides.
In AIX the boost hpp files get installed in /usr/local/include/boost-1_32/boost/...
I created /usr/local/include/boost/... with this command: ln -s /usr/local/include/boost-1_32/boost /usr/local/include/boost
In Windows the boost hpp files get installed C:\boost-1_32\boost\...
In AIX when I try to compile simple_ls.cpp I get the following:
"/usr/local/include/boost/filesystem/operations.hpp", line 18.10: 1540-0836 (S) The #include file
Brian Gaber
[...] my simple_ls.cpp currently has the following include statements:
#include "/usr/local/include/boost/filesystem/operations.hpp" #include "/usr/local/include/boost/filesystem/path.hpp" #include <iostream>
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". 2) Then make sure your compiler command line at least mention "-I /user/local/include" or "-I $(INC)" where INC ~includes~ "/user/local/include". 2a) On AIX, look inside your makefile.
[...] 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:". You should be able to compile.
participants (2)
-
Brian Gaber
-
Martin Lemieux