Skip to content

Commit b4230e9

Browse files
committed
Fix auto-linking logic for boost_numpy (Windows only).
1 parent 467a89e commit b4230e9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

include/boost/python/numpy/config.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@
6262
// Set the name of our library, this will get undef'ed by auto_link.hpp
6363
// once it's done with it:
6464
//
65-
#define BOOST_LIB_NAME boost_numpy##PY_MAJOR_VERSION##PY_MINOR_VERSION
65+
#define _BOOST_PYTHON_CONCAT(N, M, m) N ## M ## m
66+
#define BOOST_PYTHON_CONCAT(N, M, m) _BOOST_PYTHON_CONCAT(N, M, m)
67+
#define BOOST_LIB_NAME BOOST_PYTHON_CONCAT(boost_numpy, PY_MAJOR_VERSION, PY_MINOR_VERSION)
6668
//
6769
// If we're importing code from a dll, then tell auto_link.hpp about it:
6870
//
@@ -75,6 +77,9 @@
7577
#include <boost/config/auto_link.hpp>
7678
#endif // auto-linking disabled
7779

80+
#undef BOOST_PYTHON_CONCAT
81+
#undef _BOOST_PYTHON_CONCAT
82+
7883
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
7984

8085
#endif // CONFIG_NUMPY20170215_H_

0 commit comments

Comments
 (0)