title: Compiler is out of heap space
body: <p>I am trying to port a plugin written in C++ which actually does a lot of stuff, so there are lots of classes and ofcourse a lot of code as well! </p>
  
  <p>But when I try to compile the plugin, the compiler throws the following error: fatal error C1060: compiler is out of heap space. If I check my task manager it shows that there is quite some space left on the memory. I even tried restarting.</p>
  
  <p>I tried the usual answers on the internet on <a href="https://msdn.microsoft.com/en-us/library/bdscwf1c.aspx" rel="noreferrer">memory allocation limit</a> and on <a href="https://stackoverflow.com/questions/4609729/msvc-gives-up-on-template-heavy-code-with-fatal-error-c1060-compiler-is-out-of">stack overflow previously asked questions</a> as well. None of them have seemed to work for me, hence I am here.</p>
  
  <p>A few things that might be important. The plugin is extensively using the following libraries:
  FreeImage &amp; 
  protobuf-2.4.1
  p.s. I compiled the source code using VS2012 compiler.
  Using a 64-bit machine</p>
  
  <p>the error shows up in the second line of this code:</p>
  
  <pre><code>#if GOOGLE_PROTOBUF_VERSION &lt; 2004000
  #error This file was generated by a newer version of protoc which is
  #error incompatible with your Protocol Buffer headers.  Please update
  #error your headers.
  #endif
  #if 2004001 &lt; GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
  #error This file was generated by an older version of protoc which is
  #error incompatible with your Protocol Buffer headers.  Please
  #error regenerate this file with a newer version of protoc.
  #endif
  </code></pre>
  
  <p>I am lost, could anyone point me in the right direction? Thanks alot!</p>