
Thomas Heller wrote:
BorlandCCompiler doesn't use gen_lib_options() and handles debug libraries correct. It uses its own find_library_file() which uses python15_d.lib (or python15_d_bcpp.lib) if it exists. MSVCCompiler has also its own find_library_file() method which works the same way. The only problem is that gen_lib_option() calls it without the debug parameter.
Your patch does not work for MSVC:
msvccompiler->link() is called with libraries = [..., 'python15'] This calls gen_lib_options() in ccompiler, this calls msvccompiler->library_option() this calls msvccompiler->library_filename('python15'), which is implemented in the CCompiler superclass, and this returns 'python15.lib' EVEN IF debug is set. Bang!
I see, there is a second path in gen_lib_options() which uses library_option(). So we have now another candidate for a debug parameter. Good to know, I think, the problem will then have to be fixed after the release of Distutils 1.0. Rene