How to install third-party libraries

I am new to C ++, and decided to try and use odeintfor modeling, because python is too slow for my needs.

I found this package that I want to play with. I'm just not quite sure how to install or host these libraries. Is there anything C++for python-like pip install?

Side note: I'm trying to do this with help Eclipse Kepler, but I'm not married to this idea.

+3
source share
2 answers

I recommend not putting the code in your own project - this is a pretty quick and dirty solution. The right way to use a C ++ library (in fact, in any programming language I know) is to keep all the libraries separate from your own projects in a separate place on your file system .

Then you indicate to your environment where you can find library files and let your project know that they will use them. This is always the same basic idea, regardless of whether you use Makefiles or Visual Studio.

See the documentation for this library . It says:

odeint is a header-only library, no binding to precompiled code is required

, " ", , . , . ++ , (-) , "include path".

, : Eclipse Kepler ?

Google ( "eclipse kepler include path" ) . Eclipse , , ++.

, , , , :

#include <boost/numeric/odeint.hpp>

< >? , C + + : " , , ". , , (, <vector> <iostream>).

, , , , , , .

+11

odeint - , . odeint boost, main.cpp( main.cpp, ):

your_sources/
    main.cpp
    boost/
        numeric/
            odeint/
            odeint.hpp

,

#include "boost/numeric/odeint.hpp"
0
source

All Articles