Skip to content

Commit 2431370

Browse files
committed
Fix auto-linking logic (Windows only).
1 parent ac9fa53 commit 2431370

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

include/boost/python/detail/config.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@
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##PY_MAJOR_VERSION##PY_MINOR_VERSION
108+
#define _BOOST_PYTHON_CONCAT(N, M, m) N ## M ## m
109+
#define BOOST_PYTHON_CONCAT(N, M, m) _BOOST_PYTHON_CONCAT(N, M, m)
110+
#define BOOST_LIB_NAME BOOST_PYTHON_CONCAT(boost_python, PY_MAJOR_VERSION, PY_MINOR_VERSION)
109111
//
110112
// If we're importing code from a dll, then tell auto_link.hpp about it:
111113
//
@@ -118,6 +120,9 @@
118120
#include <boost/config/auto_link.hpp>
119121
#endif // auto-linking disabled
120122

123+
#undef BOOST_PYTHON_CONCAT
124+
#undef _BOOST_PYTHON_CONCAT
125+
121126
#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
122127
#define BOOST_PYTHON_SUPPORTS_PY_SIGNATURES // enables smooth transition
123128
#endif

0 commit comments

Comments
 (0)