diff --git a/Plugin/src/SofaPython3/PythonEnvironment.h b/Plugin/src/SofaPython3/PythonEnvironment.h index 2236e072..c45d3ff3 100644 --- a/Plugin/src/SofaPython3/PythonEnvironment.h +++ b/Plugin/src/SofaPython3/PythonEnvironment.h @@ -30,7 +30,13 @@ #pragma push_macro("slots") #undef slots /// This should come from python3. -#include +#if defined(WIN32) && defined(_DEBUG) + #undef _DEBUG // Prevent linking debug build of python + #include + #define _DEBUG 1 +#else + #include +#endif #pragma pop_macro("slots") #include