Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netbeans IDE 7.2.1: How to add the c++ boost library

For my next assignment I require threading in C++ and have read that the boost library for threading works fairly well. I've never added a custom library to Netbeans and was hoping someone could provide me some steps to follow in order to allow me to #include it and use it in my class.

So far I've downloaded the following: Boost library from here: http://sourceforge.net/projects/boost/files/boost/1.52.0/ (Not sure if it matters where I extract this too.. I'm assuming I need to set NetBeans to point at it somewhere within the properties of my package?)

NetBeans 7.2.1 C/C++ Installer for Windows from here: http://netbeans.org/downloads/start.html?platform=windows&lang=en&option=cpp

Compiling with: MinGW

Any help would be great. Thanks!

like image 880
user1809606 Avatar asked Nov 08 '12 15:11

user1809606


People also ask

Where do I put Boost library?

Building the special stage target places Boost library binaries in the stage/lib/ subdirectory of the Boost tree. To use a different directory pass the --stagedir=directory option to b2. b2 is case-sensitive; it is important that all the parts shown in bold type above be entirely lower-case.

How do I add Boost lib?

Go to Project properties → C/C++ → General → Additional Include Directories, and add a path to the boost library root (in my case C:\Program Files (x86)\Boost_1_53 ). Include a . hpp file in your sources, like #include <boost/lexical_cast/lexical_cast_old. hpp>

What is Boost library C++ 11?

Boost is a set of libraries for the C++ programming language that provides support for tasks and structures such as linear algebra, pseudorandom number generation, multithreading, image processing, regular expressions, and unit testing. It contains 164 individual libraries (as of version 1.76). Boost.

Is Boost library header-only?

Most Boost libraries are header-only: they consist entirely of header files containing templates and inline functions, and require no separately-compiled library binaries or special treatment when linking. The only Boost libraries that must be built separately are: Boost.


1 Answers

Linking library:

Project -> properties -> Linker ->Libraries -> Add option -> Other -> -l%libname%

Path to libraries:

Project -> properties -> Linker -> Additional Library Directories

Includes:

Project -> properties -> C++ Compiler -> Include Directories -> %paths_to_boost%

like image 91
Denis Ermolin Avatar answered Oct 20 '22 01:10

Denis Ermolin