[Tips]解决LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL'
>> Link Error 2038:
1>PyCXX.lib(cxx_extensions.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in simple.obj
1>PyCXX.lib(cxxsupport.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in simple.obj
1>s:/Lib/Release_x64/simple.pyd : fatal error LNK1319: 2 mismatches detected
>> Reason:
Project Properties -- Code Generation -- Runtime library
PyCXX: Multi-threaded Debug DLL (/MDd)
Simple: Multi-threaded DLL (/MD)
说白了就是PyCXX的Code Generation设置与Simple不匹配。
>> Solution:
PyCXX: Multi-threaded DLL (/MD)
Simple: Multi-threaded DLL (/MD)
搞匹配就好了。