class_docstr: Handles the Cygwin port of the GNU C compiler to Windows.
      
class_docstr_tok: ["Handles","the","Cygwin","port","of","the","GNU","C","compiler","to","Windows","."]
docstr: Compiles the source by spawning GCC and windres if needed.
docstr_tok: ["Compiles","the","source","by","spawning","GCC","and","windres","if","needed","."]
code: def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
      """Compiles the source by spawning GCC and windres if needed."""
      if ext == ".rc" or ext == ".res":
          # gcc needs '.res' and '.rc' compiled to object files !!!
          try:
              self.spawn(["windres", "-i", src, "-o", obj])
          except DistutilsExecError as msg:
              raise CompileError(msg)
      else:  # for other files use the C-compiler
          try:
              self.spawn(
                  self.compiler_so
                  + cc_args
                  + [src, "-o", obj]
                  + extra_postargs
              )
          except DistutilsExecError as msg:
              raise CompileError(msg)
  
imports: import os
  import sys
  import copy
  from subprocess import Popen, PIPE, check_output
  import re
  from distutils.unixccompiler import UnixCCompiler
  from distutils.file_util import write_file
  from distutils.errors import DistutilsExecError, CCompilerError, CompileError, UnknownFileError
  from distutils.version import LooseVersion
  from distutils.spawn import find_executable
label_desc: Use image node_id 2 for calling the CygwinCCompiler obj's underlying member method code with example usage: obj._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) without return types