title: How install 64-bit Qt on Windows with C++11 support?
body: <p><strong>IN A NUTSHELL:</strong></p>
  
  <ol>
  <li>My 64-bit Qt build doesn't have C++11 support.</li>
  <li>My Qt build with C++11 is 32-bit.</li>
  <li>Qt5 using the online installer is 32-bit</li>
  <li>Despite having dedicated the last 3 days of my life to this, I can't get 64-bit Qt5 to build from source.</li>
  </ol>
  
  <p>Help!  Something must be incompatible in my environment, but what could it be?</p>
  
  <hr>
  
  <p>So, I need to develop 64-bit Qt apps with C++11 on Windows.  I've found threads/guides <a href="https://stackoverflow.com/questions/11066068/how-to-program-c11-using-qt5">here</a>, <a href="https://stackoverflow.com/questions/12113400/compiling-qt-4-8-x-for-visual-studio-2012">here</a>, <a href="http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/#comment-7546" rel="nofollow noreferrer">here</a>, <a href="http://qt-project.org/wiki/Building_Qt_5_from_Git#b50aae10a392d80cb2253ce34e686ae3" rel="nofollow noreferrer">here</a> and <a href="http://duganchen.ca/building-64-bit-qt-apps-on-windows/" rel="nofollow noreferrer">here</a>, and none of them work or apply, though I note the second of these let me build Qt 4.8.3 with C++11 support (but 32-bit).  The third one looks more complicated than it should be and also involves building with VS 2010, which seems like part of the problem, so I haven't tried it.  I have also wasted a lot of time trying to build previous versions with different compilers, like mingw and clang, so I'm pretty sure that cl is what I need to use.</p>
  
  <p>Basically, I've gotten to the point where I can build Qt4.8.3 and execute 64-bit apps from within QtCreator 2.6.1, but I can't get full C++11 support.  It finds only cl from VS 10.0 which has only very limited C++11 support.  Figuring out how to get it to use cl from VS 11.0 would be one solution to my problem.  But when I try </p>
  
  <blockquote>
    <p>QMAKE_CXX = C:/Program Files (x86)/Microsoft Visual Studio
    11.0/VC/bin/cl</p>
  </blockquote>
  
  <p>the build fails with a <code>jom</code> Error 2, and if I select the option for building with <code>nmake</code> I get a similar error.</p>
  
  <p>Qt 5 should have full C++11 support.  But when I try to build it myself from source, it fails.  The reason for this seems to be that despite running configure/make from the VS2012 x64 Cross Tools command prompt, specifying <code>-platform win32-2012</code> in the configure step, and specifying <code>QMAKE_COMPILER_DEFINES  += _MSC_VER=1700 WIN32</code> as per<br>
     <a href="https://stackoverflow.com/questions/12113400/compiling-qt-4-8-x-for-visual-studio-2012">this guide</a>, in both the win32-msvc2010 and win32-msvc2012 mkspecs, it still builds with the cl from VS 2010 and that is causing some kind of conflict.  Here is my <code>configure</code> command:</p>
  
  <blockquote>
    <p>configure -static -debug-and-release -confirm-license -opensource
    -nomake tests -nomake exampmles -opengl desktop -no-libjpeg -platform win32-msvc2012</p>
  </blockquote>
  
  <p>And here's the linker failure when I try to build:</p>
  
  <p><img src="https://i.stack.imgur.com/FMdBP.png" alt="Here is the output from my build failure:"></p>
  
  <p>At the end of the top 2 paragraphs you can see that msvc-2010 is being included, and earlier in the console output (not shown) there is <code>-D_MSC_VER=1600</code> in the <code>moc</code> commands.</p>
  
  <p>So I'm at a loss, can anyone help?</p>
  
  <p><strong>Edit</strong>: I had stated that I was building 64-bit apps with Qt5, actually I'm able to build 64-bit apps (w/o C++11 support) off a build of Qt 4.8.3.  If I try this with Qt5, I get this error:</p>
  
  <blockquote>
    <p>LNK1112: module machine type 'X86' conflicts with target machine type
    'x64'</p>
  </blockquote>
  
  <p>So this leads back to compiling Qt5 in 64-bit mode, which I can't seem to do.</p>