Code::Blocks Forums

User forums => Help => Topic started by: dllabs on April 12, 2013, 05:04:12 am

Title: Yet Another Newbie Who Can't Configure Boost (YANWCCB)
Post by: dllabs on April 12, 2013, 05:04:12 am
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.

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

 
 
Title: Re: Yet Another Newbie Who Can't Configure Boost (YANWCCB)
Post by: dllabs on April 12, 2013, 05:22:13 am
I fixed it! I had the search variable as $(#boost) but it needs to be $(#boost.include).
In my next reply I will show my step by step, with the correction, in the hope it helps the next person out.

Title: Re: Yet Another Newbie Who Can't Configure Boost (YANWCCB)
Post by: dllabs on April 12, 2013, 05:24:57 am

This is a working (for me at least) example of linking built Boost libraries in a Code::Blocks project.

[/list]
Title: Re: Yet Another Newbie Who Can't Configure Boost (YANWCCB)
Post by: scarphin on April 12, 2013, 10:59:59 am
You should add $(#boost.lib) to the linker search directories not just $(#boost). The reason it seems not to be needed is you are manually pointing to the libraries yourself (I don't know if there is another way with boost). But in case a search has to be made for the required libraries, linker will look into the wrong directory $(#boost). Therefore it should be $(#boost.lib).
Title: Re: Yet Another Newbie Who Can't Configure Boost (YANWCCB)
Post by: MortenMacFly on April 13, 2013, 06:12:26 pm
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
Well you just build the BOOST build system, but not boost itself, so it cannot work.
After building bjam (actually it should be b2), you need to build boost using this tool. an built of boost takes ~30min-1h, depending on your PC. With default settings it will create a "stage" folder including the libs to link against which you then need either to move or to "install". Consult the boost docs for details - its all explained very well there.