Permalink
Browse files

COMP: Fix compilation issue on VS2010 when PythonQt Debug build again…

…st python Release

* Copied most of the contents of vtkPython.h to dPython.h
  • Loading branch information...
1 parent 65623e4 commit 7e1e07f34b2420e420e2858e5ea9a49fe1e0d235 John Stark committed with jcfr Nov 17, 2011
Showing with 21 additions and 1 deletion.
  1. +21 −1 src/dPython.h
View
@@ -60,14 +60,34 @@
*/
#ifdef _DEBUG
+// Include these low level headers before undefing _DEBUG. Otherwise when doing
+// a debug build against a release build of python the compiler will end up
+// including these low level headers without DEBUG enabled, causing it to try
+// and link release versions of this low level C api.
+# include <basetsd.h>
+# include <assert.h>
+# include <ctype.h>
+# include <errno.h>
+# include <io.h>
+# include <math.h>
+# include <sal.h>
+# include <stdarg.h>
+# include <stddef.h>
+# include <stdio.h>
+# include <stdlib.h>
+# include <string.h>
+# include <sys/stat.h>
+# include <time.h>
+# include <wchar.h>
# undef _DEBUG
# if defined(_MSC_VER) && _MSC_VER >= 1400
-# define _CRT_NOFORCE_MANIFEST 1
+# define _CRT_NOFORCE_MANIFEST 1
# endif
# include <Python.h>
# define _DEBUG
#else
# include <Python.h>
#endif
+
#endif

0 comments on commit 7e1e07f

Please sign in to comment.