Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Boost 1.62.0 with Eclipse neon CDT on Windows 7
Boost 1.62.0 with Eclipse neon CDT on Windows 7 [message #1750645] Fri, 23 December 2016 17:16 Go to next message
Hans Scharank is currently offline Hans ScharankFriend
Messages: 1
Registered: December 2016
Junior Member
Can anyone please give me a step by step guide how to integrate Boost in the current CDT?
I installed Boost and I can compile simple boost programs which rely on header files only, but as soon as I want to include a library, I get compiler errors about several boost::regex not found. I included the stage\lib path in /L and the corresponding library file in /l (without the 'bin' prefix and without extension). It simply won't work! I tried every single file from the directory, with and without prefix and extension, added pretty much any boost directory in the compiler and linker include and library directories, still nothing. I followed several suggestions from google but nothing works!
This is so annoying!!!
Re: Boost 1.62.0 with Eclipse neon CDT on Windows 7 [message #1750680 is a reply to message #1750645] Sun, 25 December 2016 01:25 Go to previous message
David VavraFriend
Messages: 1413
Registered: October 2012
Senior Member
"nothing works!" isn't helpful. What have you tried?
You need to supply information indicating the problem. A complete build log would be helpful.

In general, you need to set the linker and compiler tool settings and also need to set the header locations in Project --> Properties --> C/C++ General --> Preprocessor Include Paths, Macros etc.

With Windows whether you are using MinGW or cygwin or Microsoft Visual
Under Linux there is no boost library with a 'bin' prefix. They are all 'lib*'.
Under Linux (at least in my installation) for the regex library you need -L/usr/lib64 (which is already searched so unnecessary) and -lboost-regex

I don't have MinGW or cygwin to test so can't say what the actual library names and paths are.
But his might help: http://stackoverflow.com/a/14180152/3312726
And: http://www.boost.org/doc/libs/1_62_0/more/getting_started/windows.html
Notably: http://www.boost.org/doc/libs/1_62_0/more/getting_started/windows.html#link-your-program-to-a-boost-library


Using a Linux variant (e.g. MinGW): http://www.boost.org/doc/libs/1_62_0/more/getting_started/unix-variants.html
http://www.boost.org/doc/libs/1_62_0/more/getting_started/unix-variants.html#link-your-program-to-a-boost-library

Both show how to use boost outside of Eclipse. Once you can do that then adding it to Eclipse should be easy.

Assuming you are using the GCC loader, you can specify the complete path and name of the library as an object file circumventing the need to use -L
and -l or the Window's equivalents. For Linux this means: "/usr/lib64/libboost_regex.a" for the static library. This is suggested in the first link.

Under Windows, you can try "dir *regex*.* /s" from a top directory to locate the library file.

[Updated on: Mon, 26 December 2016 15:53]

Report message to a moderator

Previous Topic:Copy files from source to build directory as part of compilation.
Next Topic:Disable download for remote debug.
Goto Forum:
  


Current Time: Sun Jan 23 04:02:09 GMT 2022

Powered by FUDForum. Page generated in 0.01842 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top