Skip to content

Commit 4ff53cf

Browse files
authored
Use msvc major version
1 parent 485bcf5 commit 4ff53cf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

include/pybind11/detail/internals.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,11 @@ struct type_info {
297297
# if defined(__GXX_ABI_VERSION)
298298
# define PYBIND11_BUILD_ABI "_cxxabi" PYBIND11_TOSTRING(__GXX_ABI_VERSION)
299299
# elif defined(_MSC_VER) && defined(_MT)
300-
# define PYBIND11_BUILD_ABI "_mscver" PYBIND11_TOSTRING(_MSC_VER)
300+
# define PYBIND11_BUILD_ABI "_mt_mscver" PYBIND11_TOSTRING(_MSC_VER)
301+
# elif defined(_MSC_VER) && defined(_MD) && (_MSC_VER >= 1900) && (_MSC_VER < 2000)
302+
# define PYBIND11_BUILD_ABI "_md_mscver14"
303+
# elif defined(_MSC_VER) && defined(_MD)
304+
# define PYBIND11_BUILD_ABI "_md_mscver" PYBIND11_TOSTRING(_MSC_VER)
301305
# else
302306
# define PYBIND11_BUILD_ABI ""
303307
# endif

0 commit comments

Comments
 (0)