After further exploration, I tried reverting this change (Edit: I reverted only the change to External_SimpleITK.cmake):
and re-doing a clean build. It succeeded. Somehow having the variable be empty doesn’t trigger the #pragma in the python headers to include the debug .lib
Have you every solve this problem? I met the exactly same problem with you under the same environment setting.
I noticed that there might be several solutions mentioned above, which one could solve the problem?
I was wondering why can’t we just change the linked python lib to the release version of python for simpleITK in CMakeLists.txt to solve the bugs forever?