I know this has been asked and answered before, but I have followed all the answers I can find and I *still* can't configure Boost for the libraries that need special linking, such as (in my case) filesystem. Whenever I go to compile I get this error first up:
fatal error: boost/filesystem/operations.hpp: No such file or directory
Now, here are the steps I have taken.
- 1) I built Boost with GCC as follows:
- I downloaded Boost and unzipped it to C:\projects\boost_1_53_0
- I went into C:\projects\boost_1_53_0\tools\build\v2\engine and ran "build.bat gcc" to create C:\projects\boost_1_53_0\tools\build\v2\engine\bin.ntx86\bjam.exe
- I added C:\projects\boost_1_53_0\tools\build\v2\engine\bin.ntx86 to my path
- I went back into C:\projects\boost_1_53_0 and, worried that the bjam.exe in that directory might run, I renamed it to old.bjam.exe
- I ran 'bjam --toolset=gcc "--prefix=C:\projects\boost" install', as you may note, installing Boost in a different directory from the download directory. This created C:\projects\boost\lib and C:\projects\boost\include
- 2) In Codeblocks 12.11 (Windows 8 64 bit) I configured the following:
- In Settings|Global variables I created a variable "boost" with:
- base = C:\projects\boost
- include = C:\projects\boost\include\boost-1_53\
- lib = C:\projects\boost\lib
- I created a new Project called "Boost" with these settings:
- In the project's "Build options I added "$(#boost)" (no quotes) to the "Compiler" box of the "Search directories" tab for the project root.
- In the project's "Build options I added "$(#boost)" (no quotes) to the "Linker" box of the "Search directories" tab for the project root. I don't think this is needed but I did it anyway
- In the project's "Buildoptions" I added "boost_filesystem-mgw47-mt-1_53" (no quotes) to the "Link libraries" box of the "Linker settings" tab.
- 3) I created a file that contained the Boost test program "simple_ls". It contains the following preprocessor instructions:
#define BOOST_FILESYSTEM_NO_DEPRECATED
#include "boost/filesystem/operations.hpp"
#include "boost/filesystem/path.hpp"
#include "boost/progress.hpp"
#include <iostream> - 4) I hit F9 and the compiler hung on '#include "boost/filesystem/operations.hpp"'

The file operations.hpp does exist, in C:\projects\boost\include\boost-1_53\boost\filesystem\
Where did I go wrong?
thanks in advance
John