Updating the Boost version of the library depends on the Boost libraries, without rethinking

I created a library (VC10) that depends on several Boost libraries. I would like to use this library in several applications, where each application depends on different versions of Boost, and I would like to be able to do this without creating libraries for each version of Boost.

I built my library using BOOST_ALL_DYN_LINK and also using BOOST_ALL_NO_LIB, but both of these libraries seem to depend on the specific version of Boost.

Can someone explain how I can build a library that depends on Boost, where can I upgrade the Boost version without recompiling or reloading the library?

+3
source share
1 answer

" - , , Boost, Boost ?"

, . , , . , boost .

@jamesj , . , , , boost_x_y_z, x y z . ,

namespace acc = boost::accumulators;
typedef acc::features<acc::tag::density> features_t;
typedef acc::accumulator_set<double, features_t> accumulator_t;

1.47.0 :

namespace acc = boost_1_47_0::accumulators;
typedef acc::features<acc::tag::density> features_t;
typedef acc::accumulator_set<double, features_t> accumulator_t;

, , - :

namespace boost_latest = boost_1_50_0;

, :

namespace acc = boost_latest::accumulators;
typedef acc::features<acc::tag::density> features_t;
typedef acc::accumulator_set<double, features_t> accumulator_t;

, , . . .

+1

All Articles