Qt 5.0.2 for Windows 7, 64-bit (VS 2012) only compiles in 32-bit?



  • Apologies if this appears to be a simple question with a simple answer, but please bear with me.

    I went to download the 64-bit version of the above from the Qt archive.
    File: qt-windows-opensource-5.0.2-msvc2012_64-x64-offline.exe
    URL: http://download.qt-project.org/archive/qt/5.0/5.0.2/

    I'm using Microsoft Visual Studio 2012 and so installed the Qt plug-in (Visual Studio Add-in 1.2.2 for Qt5). But cutting a long story short, while trying to build a Qt project I'm receiving the following prompt:

    "The following error occurred:
    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."

    If I change* my build option and project properties -> Advanced -> Linker settings to use 32-bit version instead then my project will build. (Or rather, throw errors related to my shoddy C++ programming skills..). So to me, it appears that despite the name of the file saying "..64-x64-offline.exe" it will actually only support 32-bit? Or have I missed something substantial? Do I need to build the source myself** in order to obtain a 64-bit version?

    The reason I'm going for this very specific version of Qt (and not the latest version) relates to a project that I will soon inherent and which is using this version of Qt. For the same reason, I am pretty much stuck with using Microsoft Visual Studio 2012 too.

    * = As described in this stackoverflow question answer: http://stackoverflow.com/a/4364020/2903608
    ** = Building from source is covered by another stackoverflow question: http://stackoverflow.com/a/16533188/2903608
    I have previously attempted that path as well. However, I failed*** during one of the last steps. A colleague of mine then suggested that I try using the plain old installers from Qt's website. Which is where I'm at now.
    *** = I have noted down the steps I took and the outcomes and I'm ready to post those if building from source is the only option.

    Finally, can I just say a big thank you to all the hard-working people of this forum. Although I'm linking exclusively to StackOverflow, a lot of the instructions there originate from this forum.



  • Any thoughts on this?
    I've tried reinstalling Microsoft visual studio 2012, Qt 5.0.2 and the Qt plug-in from scratch. I have also doubly verified my settings but I'm still stuck at the error stating that there is "no Qt version assigned to this project for platform x64".

    I have also tried using the dumpbin.exe utility provided by Microsoft Visual Studio 2012 to verify that the installed Qt library is indeed 64-bits:

    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib>dumpbin C:\Qt\Qt5.0.2\5.0.2\msvc2012_64\lib*.lib /HEADERS | findstr /c:"Machine :"

    Machine : 8664 (x64)
    Machine : 8664 (x64)
    Machine : 8664 (x64)
    ...



  • Success!

    Turns out there was one further setting that had eluded me.
    The following post found the solution for me: http://stackoverflow.com/questions/10452721/theres-no-qt-version-assigned-to-this-project-for-platform-win32-visual-stu

    Basically, make sure you have in focus one of the opened files of your project. Navigate using the menu:

    QT5 -> Qt Project Settings

    Underneath the Properties tab, make sure that "Version" has selected a Qt version. Presumably, it ought to match your selection at:

    QT5 -> Qt Options, Qt Versions tab.

    All in all, the prompt with the warning message:

    “The following error occurred:
    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.”

    Is not a very intuitive error message, since it had me looking at QT5 -> Qt Options rather than the Qt Project Settings.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.