title: How to fix "c1001: An internal error..." in compiler read-only file?
body: <p>I'm new to Qt and have designed my first GUI using the creator (v3.4.1).  I've coded some of the guts of the program, but right now I just want to test the GUI.  When I try to build the project, I get the error:</p>
  <blockquote>
  <p>C1001: An internal error has occurred in the compiler.</p>
  <p>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xmemory0:61</p>
  </blockquote>
  <p>The code in <em><strong>xmemory()</strong></em> this points to is as follows: <strong>NOTE: Line 61 is the specific error line.</strong></p>
  <pre><code>58    template&lt;&gt; inline
  59      void _Destroy(char *)
  60      {   // destroy a char (do nothing)
  61      }
  </code></pre>
  <p>Being new to this, I'm not even sure what this line of code is supposed to do in the context of my project.
  Any insight or solutions would be very much appreciated.  Thanks</p>
  <p><strong>EDIT:</strong>
  Okay, I found a bit of an explanation of the problem But I'm not sure how to implement its fix suggestion of simplifying since I didn't code it, the creator did.  Anyway, this is what it says:</p>
  <pre><code>\CPSC542_-_Gradebook&quot; -I&quot;.&quot; -I&quot;D:\Qt\Qt5.4.2\5.4\msvc2013_64\include&quot; -I&quot;D:\Qt\Qt5.4.2\5.4\msvc2013_64\include\QtWidgets&quot; -I&quot;D:\Qt\Qt5.4.2\5.4\msvc2013_64\include\QtGui&quot; -I&quot;D:\Qt\Qt5.4.2\5.4\msvc2013_64\include\QtANGLE&quot; -I&quot;D:\Qt\Qt5.4.2\5.4\msvc2013_64\include\QtCore&quot; -I&quot;debug&quot; -I&quot;.&quot; -I&quot;D:\Qt\Qt5.4.2\5.4\msvc2013_64\mkspecs\win32-msvc2013&quot; -Fodebug\ @C:\Users\Louis\AppData\Local\Temp\moc_mainwindow.obj.77700.15.jom
  moc_mainwindow.cpp
  C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xmemory0(61) : fatal error C1001: An internal error has occurred in the compiler.
  (compiler file 'msc1.cpp', line 1325)
   To work around this problem, try simplifying or changing the program near the locations listed above.
  Please choose the Technical Support command on the Visual C++ 
   Help menu, or open the Technical Support help file for more information
  Internal Compiler Error in C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\cl.exe.  You will be prompted to send an error report to Microsoft later.
  jom: C:\Users\Louis\Desktop\build-CPSC542_-_Gradebook-Desktop_Qt_5_4_2_MSVC2013_64bit-Debug\Makefile.Debug [debug\main.obj] Error 1
  jom: C:\Users\Louis\Desktop\build-CPSC542_-_Gradebook-Desktop_Qt_5_4_2_MSVC2013_64bit-Debug\Makefile.Debug [debug\mainwindow.obj] Error 1
  jom: C:\Users\Louis\Desktop\build-CPSC542_-_Gradebook-Desktop_Qt_5_4_2_MSVC2013_64bit-Debug\Makefile.Debug [debug\moc_mainwindow.obj] Error 1
  jom: C:\Users\Louis\Desktop\build-CPSC542_-_Gradebook-Desktop_Qt_5_4_2_MSVC2013_64bit-Debug\Makefile [debug] Error 2
  15:22:56: The process &quot;D:\Qt\Qt5.4.2\Tools\QtCreator\bin\jom.exe&quot; exited with code 2.
  Error while building/deploying project CPSC542_-_Gradebook (kit: Desktop Qt 5.4.2 MSVC2013 64bit)
  When executing step &quot;Make&quot;
  15:22:56: Elapsed time: 00:01.
  </code></pre>
  <p><strong>EDIT 2:</strong>
  Okay, this is all the code in the project.  It's basically a blank project, but it gets the same error as above on 3 separate computers (just being thorough).</p>
  <p><strong>mainwindow.h:</strong></p>
  <pre><code>#ifndef MAINWINDOW_H
  #define MAINWINDOW_H
  
  #include &lt;QMainWindow&gt;
  
  namespace Ui {
  class MainWindow;
  }
  
  class MainWindow : public QMainWindow
  {
      Q_OBJECT
  
  public:
      explicit MainWindow(QWidget *parent = 0);
      ~MainWindow();
  
  private:
      Ui::MainWindow *ui;
  };
  
  #endif // MAINWINDOW_H
  </code></pre>
  <p><strong>main.cpp</strong></p>
  <pre><code>#include &quot;mainwindow.h&quot;
  #include &lt;QApplication&gt;
  
  int main(int argc, char *argv[])
  {
      QApplication a(argc, argv);
      MainWindow w;
      w.show();
  
      return a.exec();
  }
  </code></pre>
  <p><strong>mainwindow.cpp</strong></p>
  <pre><code>#include &quot;mainwindow.h&quot;
  #include &quot;ui_mainwindow.h&quot;
  
  MainWindow::MainWindow(QWidget *parent) :
      QMainWindow(parent),
      ui(new Ui::MainWindow)
  {
      ui-&gt;setupUi(this);
  }
  
  MainWindow::~MainWindow()
  {
      delete ui;
  }
  </code></pre>
  <p><strong>mainwindow.ui</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;ui version=&quot;4.0&quot;&gt;
   &lt;class&gt;MainWindow&lt;/class&gt;
   &lt;widget class=&quot;QMainWindow&quot; name=&quot;MainWindow&quot;&gt;
    &lt;property name=&quot;geometry&quot;&gt;
     &lt;rect&gt;
      &lt;x&gt;0&lt;/x&gt;
      &lt;y&gt;0&lt;/y&gt;
      &lt;width&gt;1146&lt;/width&gt;
      &lt;height&gt;629&lt;/height&gt;
     &lt;/rect&gt;
    &lt;/property&gt;
    &lt;property name=&quot;windowTitle&quot;&gt;
     &lt;string&gt;MainWindow&lt;/string&gt;
    &lt;/property&gt;
    &lt;widget class=&quot;QWidget&quot; name=&quot;centralWidget&quot;/&gt;
    &lt;widget class=&quot;QMenuBar&quot; name=&quot;menuBar&quot;&gt;
     &lt;property name=&quot;geometry&quot;&gt;
      &lt;rect&gt;
       &lt;x&gt;0&lt;/x&gt;
       &lt;y&gt;0&lt;/y&gt;
       &lt;width&gt;1146&lt;/width&gt;
       &lt;height&gt;21&lt;/height&gt;
      &lt;/rect&gt;
     &lt;/property&gt;
    &lt;/widget&gt;
    &lt;widget class=&quot;QToolBar&quot; name=&quot;mainToolBar&quot;&gt;
     &lt;attribute name=&quot;toolBarArea&quot;&gt;
      &lt;enum&gt;TopToolBarArea&lt;/enum&gt;
     &lt;/attribute&gt;
     &lt;attribute name=&quot;toolBarBreak&quot;&gt;
      &lt;bool&gt;false&lt;/bool&gt;
     &lt;/attribute&gt;
    &lt;/widget&gt;
    &lt;widget class=&quot;QStatusBar&quot; name=&quot;statusBar&quot;/&gt;
   &lt;/widget&gt;
   &lt;layoutdefault spacing=&quot;6&quot; margin=&quot;11&quot;/&gt;
   &lt;resources/&gt;
   &lt;connections/&gt;
  &lt;/ui&gt;
  </code></pre>