diff --git a/interfaces/cython/SConscript b/interfaces/cython/SConscript index a51f199de..71403a4c4 100644 --- a/interfaces/cython/SConscript +++ b/interfaces/cython/SConscript @@ -70,10 +70,16 @@ localenv['py_libdirs'] = repr([x for x in libDirs if x]) # Compile the Python module with the same compiler as the rest of Cantera localenv['py_extra_compiler_args'] = repr([]) +localenv['py_extra_link_args'] = repr([]) if localenv['OS'] == 'Windows': if env['CC'] == 'cl': + flags = ['/EHsc'] + if env['debug']: + flags.extend(['/Zi', '/Fd_cantera.pdb']) + localenv['py_extra_link_args'] = repr(['/DEBUG']) compilerOpt = ' --compiler=msvc' - localenv['py_extra_compiler_args'] = repr(['/EHsc']) + localenv['py_extra_compiler_args'] = repr(flags) + elif env['CC'] == 'gcc': compilerOpt = ' --compiler=mingw32' else: diff --git a/interfaces/cython/setup.py.in b/interfaces/cython/setup.py.in index cc4702d08..c9842037f 100644 --- a/interfaces/cython/setup.py.in +++ b/interfaces/cython/setup.py.in @@ -9,7 +9,8 @@ exts = [Extension("cantera._cantera", language="c++", libraries=@py_cantera_libs@, library_dirs=@py_libdirs@, - extra_compile_args=@py_extra_compiler_args@)] + extra_compile_args=@py_extra_compiler_args@, + extra_link_args=@py_extra_link_args@)] setup(name="Cantera", version="@cantera_version@",