
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) else: compiler.warn ("no library file corresponding to " "'%s' found (skipping)" % lib) else: 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). Enjoy, Mike