title: Embedding Python in a Visual Studio 2012 C++ Project
body: <p>I included the usage of python scripts for my c++ project in Visual Studio 2010 like described in the CodeProject article: <a href="http://www.codeproject.com/Articles/11805/Embedding-Python-in-C-C-Part-I" rel="nofollow">http://www.codeproject.com/Articles/11805/Embedding-Python-in-C-C-Part-I</a></p>
  
  <p>This was working fine until I tried to compile my project with Visual Studio 2012. To compile it with 2012 if 2010 is NOT installed it's required to change the platform toolset from v100 to v110. After changing the toolset the included "pyconfig.h" gives some include error, because the file "basetsd.h" is not found (with python 2.7 and 3.3 the same). The pyconfig shows some #ifdef what is working for VS10 (and I think down to VS6) but the file for VS12 seems to be missing:</p>
  
  <pre><code>#if defined(_MSC_VER) &amp;&amp; _MSC_VER &gt;= 1200
  /* This file only exists in VC 6.0 or higher */
  #include &lt;basetsd.h&gt;
  #endif
  </code></pre>
  
  <p>If I add some include path (Windows Toolkit) or delete the include command it compiles until the linker cannot find or open the "kernel32.lib". However, if I add a lib path for some kernel32.lib all python commands will unresolved.</p>
  
  <p>How to get that work? What's wrong with Python and VS2012?</p>