Skip to content

Commit 7e1e07f

Browse files
John Starkjcfr
John Stark
authored andcommitted
COMP: Fix compilation issue on VS2010 when PythonQt Debug build against python Release
* Copied most of the contents of vtkPython.h to dPython.h
1 parent 65623e4 commit 7e1e07f

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

src/dPython.h

+21-1
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,34 @@
6060
*/
6161

6262
#ifdef _DEBUG
63+
// Include these low level headers before undefing _DEBUG. Otherwise when doing
64+
// a debug build against a release build of python the compiler will end up
65+
// including these low level headers without DEBUG enabled, causing it to try
66+
// and link release versions of this low level C api.
67+
# include <basetsd.h>
68+
# include <assert.h>
69+
# include <ctype.h>
70+
# include <errno.h>
71+
# include <io.h>
72+
# include <math.h>
73+
# include <sal.h>
74+
# include <stdarg.h>
75+
# include <stddef.h>
76+
# include <stdio.h>
77+
# include <stdlib.h>
78+
# include <string.h>
79+
# include <sys/stat.h>
80+
# include <time.h>
81+
# include <wchar.h>
6382
# undef _DEBUG
6483
# if defined(_MSC_VER) && _MSC_VER >= 1400
65-
# define _CRT_NOFORCE_MANIFEST 1
84+
# define _CRT_NOFORCE_MANIFEST 1
6685
# endif
6786
# include <Python.h>
6887
# define _DEBUG
6988
#else
7089
# include <Python.h>
7190
#endif
7291

92+
7393
#endif

0 commit comments

Comments
 (0)