Thanks to the_mandrill this solution:
First you need to download patch 3891 . Then you need to apply the patch - you can find the patch utility for windows, but I just edited the files broken out in the patch manually; files are located in \ qmake \ generators \ win32
Then you need to create QT from scratch, which can be done by navigating the command line (make sure that this is the Visual Studio 2008 x64 command line from the Visual Studio directory) to the directory in which you installed QT, presumably C: /QT/4.7. 0 and enter configure , then nmake .
Building a QT will take a lot of time. In the meantime, adding them to your qmake files will automatically determine your host OS. Keep in mind that this solution does NOT configure win32 and x64 on x64 - only x64 configuration.
contains(QMAKE_HOST.arch, x86):{ QMAKE_LFLAGS *= /MACHINE:X86 } contains(QMAKE_HOST.arch, x86_64):{ QMAKE_LFLAGS *= /MACHINE:X64 }
This creates a working x64 Visual Studio solution that compiles and links without errors.
source share