Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Building 64-bit using Visual Studio 2010



  • Our app needs to be 64-bit (several of the libraries it depends on are 64-bit only), and we're stuck using Visual Studio 2010 for now. I followed the instructions here:
    http://qt-project.org/forums/viewthread/23048
    for building the 64-bit QT libraries. I couldn't get the build to succeed with the 5.2 source code, but with the 5.1 source code I'm able to build the libraries.

    Now what? I think I need to add this as a "kit" but it's not at all obvious how to proceed.

    Also, there are several developers who will be working on this project, what files do I need to copy to the other developers' hard drives so they can build it too?

    Thanks,
    Chris


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    For the kit, first add your new Qt to the Qt version panel, then just create a new kit and set the Qt version to the one you just added.

    What files are you thinking about for the other developers ?

    What error did you got when building 5.2 ?



  • Thanks for the prompt response!

    Unfortunately I am way behind you in QT expertise, so I'm not even sure what your answer means. What is a Qt version panel?

    I didn't realize I was creating a new Qt. I downloaded the source and did an nmake which did .... something. Quite frankly, I'm not even sure what the nmake built, or where it put it.

    In terms of the other developers, I would like to make it possible for them to build this 64-bit Qt project without requiring everybody to download the Qt source and build it themselves.

    Thanks,
    Chris



  • NMake builds all the libraries and tools that come with Qt, unless you configured the build not to. If you don't want other developers to have to download the qt source and build it, you have figure some way to distribute it to your coworkers. For instance, putting it on a shared drive to where they can grab a copy of it.


  • Lifetime Qt Champion

    In Qt Creator's Options, the Build & Run panel, you have General, Kits, Qt Versions <- this one

    To build Qt you must first call configure from the Visual Studio 64bit command line, and only then call nmake.

    I would recommend an out of source build, meaning: create a directory e.g. Qt5.2.0-64 in the same folder you have the sources and call configure from this one. You will have to make sure every other developer has Qt5.2.0-64 in the EXACT same folder on their computer.



  • Here's what I tried:

    1. Downloaded QT 5 and installed it into c:\qt5
    2. Downloaded the 5.1 source from http://download.qt-project.org/archive/qt/5.1/5.1.0/single/ into c:\qt5\source (so I have folders named c:\qt5\source\qtbase, c:\qt5\source\qtscript, etc.)
    3. Opened a "Visual Studio x64 Win64 Command Prompt"
    4. Created a new folder named c:\qt5\source\qt5.1-64
    5. cd c:\qt5\source\qt5.1-64
    6. ..\configure -debug-and-release -opensource -developer-build -make libs -make tools -make examples -qt-sql-sqlite -opengl desktop -platform win32-msvc2010 -fully-process -openssl -L C:/OpenSSL-Win64/lib -I c:/OpenSSL-Win64/include -icu -L C:/icu/lib64 -I C:/icu/include
    7. nmake

    C:\Qt5\Source\qtbase\src\corelib\kernel\qtimer.cpp(417) : fatal error C1083: Cannot open include file: 'qtimer.moc': No such file or directory

    I was able to complete the build when I ran it (did the configure and the nmake) directly in c:\qt5\source.


  • Lifetime Qt Champion

    qt5.1-64 should bin C:\qt5 not in C:\qt5\source



  • If I create c:\qt5\qt5.1-64 and call ../source/configure and then nmake from there, I get the same error (can't find qtimer.moc).



  • I am experiencing the same error (can't find qtimer.moc). Did you have any luck resolving this issue?



  • I had the same error here building the 32Bit version. The reason for this, AFAICS was, that I tried to make a shadow build from a directory where a I already made an in source build. After a fresh checkout, everything compiled fine.

    Hope this helps,
    Dominik


Log in to reply