Qt World Summit: Submit your Presentation

Build x64 program with Qt5.0.2 and MS VS2012

  • Hi,

    i installed the Qt 5.0.2 for Windows 64-bit and the VS Addin 1.2.1 and try to produce a x64 Build of my program.
    I open VS2012 and click on "Open Qt Project File (.pro)" in the QT5 Section and it works for a while and produces VS-project files without any errors.
    First of all, the platform is still set to Win32 and when i compile i eventually get the error: fatal error LNK1112: Modul-Computertyp "X86" steht in Konflikt mit dem Zielcomputertyp "x64". Which is obvious.
    So, first question: how do i configure the .pro files so it automatically changes the Platform from Win32 to x64?
    I searched for it and found something about QMAKE_LFLAGS but i dont get it to work.

    Ok, it does not work automatically, but i should be able to change manually to x64. So i go on Properties and use the Configuration Manager to create a "New Solution Platform" for x64 and everything changes to x64. Looks fine so far.
    But when i try to compile i get a popup with the error from the Qt Visual Studio Add-in: "The following error occured: There's no Qt version Assigned to this project for platform x64. Please use the 'change Qt version' feature and choose a valid Qt version for this platform."

    I'm stuck here. When i go to the QT5 tab and look into the "Qt Project Settings" and "Qt Options" there my 64bit qt-version is defined.
    So, Second question: What now? :)

    P.S. i have the 32Bit version of Qt5.0.2 installed parallel and when i choose it i can successfully compile a 32bit version in VS 2012.


  • Hi Seppel,

    I have exactly the same problem...

    Did you find a solution yet?

    This is pretty annoying... cant build x64 program...

  • Me again...

    I solved the problem...
    pretty dumb one xD

    I configured Qt with -win32 msvc2010

    obvious that is wrong so i did it again with -win32 msvc2012

    and now it works :)

  • i didn't compile Qt myself. I downloaded the compiled version "Qt 5.0.2 for Windows 64-bit (VS 2012, 500 MB)"

    is someone successfully using this version with 64bit ?

  • You can compile 32 and 64 bits versions on a 64 bit machine? I'm running a 32 bit machine and I find myself having to compile the source to get it to run on VS2012, sadly.

Log in to reply