Monday, 18 October 2010

Config Boost C++ libraries in Eclipse

I have found the way to config Boost C++ libraries in Eclipse on the Internet. Hence, I will share this to everyone who need:
"I just went through the whole process of installing MinGW, compiling boost and installing Eclipse CDT and I'm able to compile simple programs using boost:regex. I'll write down all the steps. I hope that can be of help.
I've installed MinGW and MSYS in their default location.
Here are the step I took to build boost:
  • Download from
  • Put bjam.exe somewhere in your PATH
  • Unpack boost in C:\mingw\boost_1_42_0
  • Open an msys terminal window and cd /c/mingw/boost_1_42_0
  • In the boost directory run bjam --build-dir=build toolset=gcc stage
To configure Eclipse:
  • Add CDT to Eclipse 3.5 from the update site
  • Create a new C++ project
  • Under the Project menu select properties
  • Make sure the configuration is Debug [Active]
  • In "C/C++ General" > "Paths and Symbols"
    • Under the Includes tab select the GNU C++ language and add C:\MinGW\boost_1_42_0
    • Under the Library Paths tab add C:\MinGW\boost_1_42_0\stage\lib
  • In "C/C++ Build" > "Settings"
    • Select MinGW C++ Linker > Libraries
    • Click on the add button for Libraries (-l)
    • Type libboost_regex-mgw34-mt-d (without the .lib)