Index: cygwinccompiler.py =================================================================== --- cygwinccompiler.py (revision 63402) +++ cygwinccompiler.py (working copy) @@ -155,7 +155,10 @@ if ext == '.rc' or ext == '.res': # gcc needs '.res' and '.rc' compiled to object files !!! try: - self.spawn(["windres", "-i", src, "-o", obj]) + args = list(set( + x for x in cc_args + extra_postargs + pp_opts + if x.startswith(('-D', '-I')))) + self.spawn(["windres", "-i", src, "-o", obj] + args) except DistutilsExecError, msg: raise CompileError, msg else: # for other files use the C-compiler