|
Boost Users : |
From: Elsbeth (els_at_[hidden])
Date: 2006-11-23 09:19:59
Hi
We were having problems while linking boost program_options dynamically in
Visual Studio.NET
Linking to lib file: boost_program_options-vc71-mt-gd-1_33.lib
d:\Develop\SDK and
Libraries\boost_1_33_0\boost\program_options\variables_map.hpp(130) : warning
C4273: 'boost::program_options::store' : inconsistent dll linkage
d:\Develop\SDK and
Libraries\boost_1_33_0\boost\program_options\variables_map.hpp(138) : warning
C4273: 'boost::program_options::store' : inconsistent dll linkage
Problem is that in file variables_map.hpp 'BOOST_PROGRAM_OPTIONS_DECL ' is
missing in friend declaration of function 'store'.
so:
=======================
class BOOST_PROGRAM_OPTIONS_DECL variables_map :
public abstract_variables_map,
public std::map<std::string, variable_value>
{
...
friend void store(...);
};
...
BOOST_PROGRAM_OPTIONS_DECL void store(...);
=======================
should be:
=======================
class BOOST_PROGRAM_OPTIONS_DECL variables_map :
public abstract_variables_map,
public std::map<std::string, variable_value>
{
...
friend void BOOST_PROGRAM_OPTIONS_DECL store(...);
};
...
BOOST_PROGRAM_OPTIONS_DECL void store(...);
=======================
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net