Author Topic: Using Boost libs  (Read 5483 times)

Offline apgmr

  • Single posting newcomer
  • *
  • Posts: 4
Using Boost libs
« 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!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Using Boost libs
« Reply #1 on: December 29, 2010, 01:27:15 am »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Online stahta01

  • Lives here!
  • ****
  • Posts: 7590
    • My Best Post
Re: Using Boost libs
« Reply #2 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline apgmr

  • Single posting newcomer
  • *
  • Posts: 4
Re: Using Boost libs
« Reply #3 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.