Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: apgmr on December 28, 2010, 11:56:25 pm

Title: Using Boost libs
Post by: apgmr on December 28, 2010, 11:56:25 pm
Code::Blocks and Boost libs.

Can anyone tell me how to set up Code::Blocks to use Boost libraries on a Windows system? I have installed and compiled the library set, and I followed the directions for global compiler-variables per the Code::Blocks web site. Yet, the compiler can never find the Boost header files. My setup is detailed below:

Boost Libs location: C:\Program Files\CodeBlocks\boost_1_44_0

In the .cpp file, I tried the following:
   #include <boost/regex.hpp>
   #include “boost/regex.hpp”
   #include <boost\regex.hpp>
   #include “boost\regex.hpp”

Setup in the Global Variable Editor:
   Current Variable: boostlibs (a new entry)
   Builtin Fields base: C:\Program Files\CodeBlocks\
   Builtin Fields include: C:\Program Files\CodeBlocks\boost_1_44_0

I have also tried the following:
   Builtin Fields base: C:\Program Files\CodeBlocks\boost_1_44_0
   Builtin Fields include: C:\Program Files\CodeBlocks\boost_1_44_0\libs
and
   Builtin Fields base: C:\Program Files\CodeBlocks\boost_1_44_0
   Builtin Fields include: C:\Program Files\CodeBlocks\boost_1_44_0

Any help would be greatly appreciated!
Title: Re: Using Boost libs
Post by: oBFusCATed on December 29, 2010, 01:27:15 am
You get the standard answer - read this: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
Title: Re: Using Boost libs
Post by: stahta01 on December 29, 2010, 01:36:54 am
Please read and also turn on Full Compiler Logging as oBFusCATed suggested.

http://wiki.codeblocks.org/index.php?title=BoostWindowsQuickRef#Add_Boost_search_directories_to_your_project

Note: Build Boost steps is not always needed; depends on library you are using.

Tim S.
Title: Re: Using Boost libs
Post by: apgmr on December 29, 2010, 04:43:08 am
Thanks for the advice.

stahta01: You nailed the problem. I made a simple entry into the search directories section, and the compiler was then able to find the header files.