title: Compiling python modules with DEBUG defined on MSVC
body: <p>Python rather stupidly has a pragma directive in its include files that forces a link against <code>python26_d.lib</code> when the <code>DEBUG</code> preprocessor variable is defined. This is a problem because the python installer doesn't come with <code>python26_d.lib</code>! So I can't build applications in MSVC in debug mode. If I temporarily <code>#undef DEBUG</code> for just one file I get many complaints about inconsistent DLL linkage. If I change the pragma in pythons include file I get undefined references to various debug functions.</p>
  
  <p>I have tried compiling my own version of python but its somehow different enough from the python that gets distributed that I can't use my modules with apps built with the vanilla version of python</p>
  
  <p>Can anyone give me any advice on how to get round this?</p>