[Distutils] Bug report: debug builds on msvc compiler don't specify *_d.lib a s link sources

Mike Fletcher mfletch@tpresence.com
Thu Sep 28 00:52:03 2000

In ccompiler, you have this code in gen_lib_options:

    for lib in libraries:
        (lib_dir, lib_name) = os.path.split (lib)
        if lib_dir:
            lib_file = compiler.find_library_file ([lib_dir], lib_name)
            if lib_file:
                lib_opts.append (lib_file)
                compiler.warn ("no library file corresponding to "
                               "'%s' found (skipping)" % lib)
            lib_opts.append (compiler.library_option (lib))

Note that you aren't passing "debug" to compiler.find_library_file, so the
debug libraries will never get used.  Also note that msvccompiler doesn't
provide for passing the debug flag to library_option, so it doesn't do the
proper name mangling (adding _d) for the library name.  I'm guessing you'll
need to make gen_lib_options get passed the debug flag, and then make it
pass that flag on to the compiler methods.  No clue what to do for non-vc++
compilers (or even if they need debug flags).