Configuring Visual Studio To Work With Boost.python And Python 3
Solution 1:
With the community help I have found answers to couple of the questions.
- Is it possible to influence the logic used by VS to look for Boost.Python library?
Name of library depends on value defined as macro BOOST_LIB_NAME in file boost/python/detail/config.hpp.
I have tried to change line (108 in boost 1.64.0)
#define BOOST_LIB_NAME boost_pythonto
#define BOOST_LIB_NAME boost_python3And desirable library file changed from boost_python-vc120-mt-1_64.lib to boost_python3-vc120-mt-1_64.lib.
It should be noted, that instead of changing values in config.hpp file auto_link.hpp can be created and used with redefinition of BOOST_LIB_NAME.
- What option in the project properties should make VS2013 to use different LIB or DLL files, e.g.
libboost_python3-vc120-mt-1_64.liborboost_python3-vc120-mt-1_64.dllinstead ofboost_python-vc120-mt-1_64.lib?
That is also regulated by defines.
In particular, adding to the beginning of my code (before #include <boost/python.hpp>) the line
#define BOOST_PYTHON_STATIC_LIBforces MSVS to search file libboost_python3-vc120-mt-1_64.lib (or libboost_python-vc120-mt-1_64.lib), i.e. static lib.
And vice versa line
#define BOOST_PYTHON_DYNAMIC_LIBor
#define BOOST_ALL_DYN_LINKcan be used to import code from a dll.
Post a Comment for "Configuring Visual Studio To Work With Boost.python And Python 3"