Skip to content

Commit 9082971

Browse files
jakirkhamstefanseefeld
authored andcommitted
Fix BOOST_LIB_NAME for Python 3
This was reusing the Python 2 name on Python 3, which is incorrect since the Python 3 library for Boost.Python now has a `3` in it. Hence this checks against the Python version and defines this correctly.
1 parent 664d443 commit 9082971

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

include/boost/python/detail/config.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@
105105
// Set the name of our library, this will get undef'ed by auto_link.hpp
106106
// once it's done with it:
107107
//
108-
#define BOOST_LIB_NAME boost_python
108+
#if PY_MAJOR_VERSION == 2
109+
# define BOOST_LIB_NAME boost_python
110+
#elif PY_MAJOR_VERSION == 3
111+
# define BOOST_LIB_NAME boost_python3
112+
#endif
109113
//
110114
// If we're importing code from a dll, then tell auto_link.hpp about it:
111115
//

0 commit comments

Comments
 (0)