Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. 5.0, Windows 7 and MSVC 2010, and 64 bit compilation

5.0, Windows 7 and MSVC 2010, and 64 bit compilation

Scheduled Pinned Locked Moved General and Desktop
9 Posts 4 Posters 18.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pmaynard
    wrote on last edited by
    #1

    I thought the 5.0 release was going to provide libraries that supported 64 bit compilation. When I start a new console project using QtCreator 2.6.1 with 5.0 installed, it only gives me a kit choice of "Desktop Qt 5.0.0 MSVC2010 32bit (SDK)". Do I have to build the 5.0 64 bit libraries from source using my msvc 2010 pro compiler (whine ...)? If this is the only way, where (and what) is the best guide for a newbie to follow to do this? Or is there a secret handshake to turn on 64 bit support?

    And more whine - I've looked at the release notes, the wiki, and everywhere I can think of (including google) for info on building 64 bit Qt apps and can't find anything...

    Paul

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      You will have to build a 64-bit version yourself but, as a self-professed newbie, you shouldn't bother unless you really need 64-bit memory space.

      The source code bundle includes, as always, a file "README":http://qt.gitorious.org/qt/qt5/blobs/stable/README that tells you pre-requisites and the commands to type to build the Qt libraries. They do provide some links to more detail on the web site: http://qt-project.org/wiki/Building-Qt-5-from-Git The instructions rely on a level of familiarity with a command line and correct establishment of a build environment.

      Once you have a set 64-bit libraries the Qt build system (qmake) will create 64-bit applications and libraries by default. There's no need for "info on building 64-bit apps": it's no different.

      1 Reply Last reply
      0
      • F Offline
        F Offline
        focusgfx
        wrote on last edited by
        #3

        YOU NEED TO CHANGE ALL THE PATHS AND VARIABLES YOU WILL SEE IN THIS TUTORIAL TO POINT AT THE RIGHT PATHS ON YOUR MACHINE

        1-Download and install python
        http://www.python.org/ftp/python/3.3.0/python-3.3.0.amd64.msi

        2-download and unzib ICU to c:\icu
        http://download.icu-project.org/files/icu4c/50.1.1/icu4c-50_1_1-Win64-msvc10.zip

        3-Download and install Perl64
        http://www.activestate.com/activeperl/downloads/thank-you?dl=http://downloads.activestate.com/ActivePerl/releases/5.16.1.1601/ActivePerl-5.16.1.1601-MSWin32-x64-296175.msi

        4-Download and install ruby
        http://rubyforge.org/frs/download.php/76642/rubyinstaller-1.9.3-p362.exe

        5-Download and install OpenSSL
        http://slproweb.com/download/Win64OpenSSL-1_0_1c.exe

        6-Download and install Windows SDK
        http://download.microsoft.com/download/F/1/0/F10113F5-B750-4969-A255-274341AC6BCE/GRMSDKX_EN_DVD.iso

        7-Download and unzib QT5 source to a any directory, ex C:\QT\X64\5.0.0\msvc2010\qtbase
        (This path will be added to path variable in your environment variables later)
        http://releases.qt-project.org/qt5/5.0.0/single/qt-everywhere-opensource-src-5.0.0.zip

        8-Make a new environment variable
        Name: QMAKESPEC
        Value: win32-msvc2010

        9-Make another environment variable
        Name: QTDIR
        Value: C:\QT\X64\5.0.0\msvc2010\qtbase

        10-Make sure you have these vars in your path
        C:\icu\bin64;C:\Ruby193\bin;C:\Python33;C:\Perl64\site\bin;C:\Perl64\bin;%QTDIR%\bin;C:\QT\X64\5.0.0\msvc2010\gnuwin32\bin;

        11-After installing everything, start "Visual Studio x64 Win64 Command Prompt" from start menu

        12-Enter these commands
        set CL=/MP PRESS ENTER
        cd C:\QT\X64\5.0.0\msvc2010 PRESS ENTER

        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

        PRESS ENTER
        13-Press y to accept the license agreement and PRESS ENTER

        14-Now the configuration process starts, it will take around a minute to configure qt

        15-After the configuration finishes just type nmake PRESS ENTER

        16-The compiling should start, this will take around two hours if you have a fast machine.

        If you need to compile QtCreator X64 you need to

        1-Download and unzib QtCreator source code to a directory ex C:\QT\X64\Tools\QtCreator
        http://qt.gitorious.org/qt-creator/qt-creator/archive-tarball/master

        2-Start "Visual Studio x64 Win64 Command Prompt" from start menu

        3-Enter these commands
        set CL=/MP PRESS ENTER
        cd C:\QT\X64\Tools\QtCreator PRESS ENTER

        C:\QT\X64\5.0.0\msvc2010\qtbase\bin\qmake.exe "QT_PRIVATE_HEADERS=C:\QT\X64\5.0.0\msvc2010\qtbase\lib" C:\QT\X64\Tools\QtCreator\qtcreator.pro -r -spec win32-msvc2010 "CONFIG+=release"

        PRESS ENTER

        4-After the processing finishes just type nmake and PRESS ENTER
        this will take around 20 minutes to complete.

        if you want to compile mysqldriver plugin

        1-Download and install MySql Server
        http://dev.mysql.com/downloads/mirror.php?id=411066

        2-Go to C:\QT\X64\5.0.0\msvc2010\qtbase\src\plugins\sqldrivers\mysql and open the file "mysql.pro"
        in notepad

        3-Add the following lines at the end of the file
        INCLUDEPATH += "C:\Program Files\MySQL\MySQL Server 5.5\include"
        LIBS += -L"C:\Program Files\MySQL\MySQL Server 5.5\lib"

        4- save and close the file

        5-Start "Visual Studio x64 Win64 Command Prompt" from start menu

        6-Enter these commands
        set CL=/MP PRESS ENTER
        cd C:\QT\X64\5.0.0\msvc2010\qtbase\src\plugins\sqldrivers\mysql PRESS ENTER

        C:\QT\X64\5.0.0\msvc2010\qtbase\bin\qmake.exe C:\QT\X64\5.0.0\msvc2010\qtbase\src\plugins\sqldrivers\mysql\mysql.pro

        PRESS ENTER

        7- Now just type nmake PRESS ENTER
        The mysql driver plugin should now be compiled

        hope that helps.

        1 Reply Last reply
        0
        • F Offline
          F Offline
          focusgfx
          wrote on last edited by
          #4

          my internet was slow so I edited the post many time, sorry

          1 Reply Last reply
          0
          • F Offline
            F Offline
            focusgfx
            wrote on last edited by
            #5

            sorry

            1 Reply Last reply
            0
            • P Offline
              P Offline
              pmaynard
              wrote on last edited by
              #6

              focus-gfx: thank you very much. I suspected that there was an elaborate procedure, and there sure is. I've printed out your email so I can have it next to me when I start later today.

              Does anyone know if the "official" 64 bit libs are coming in the 5.1 (or soon thereafter) updates?

              Paul

              1 Reply Last reply
              0
              • M Offline
                M Offline
                maitai
                wrote on last edited by
                #7

                Hello,

                I follow your steps and qt 5.0.1 (latest from git) compiled fine (Windows 7/64bits/mscv2010). My problem is that when I use that kit to compile, my application is around 7 times slower than when executed with the pre-compiled 32bits qt5 from Digia.

                I have tried many other options for configure but no luck... Any idea of what I am doing wrong?

                Thanks

                1 Reply Last reply
                0
                • F Offline
                  F Offline
                  focusgfx
                  wrote on last edited by
                  #8

                  [maitai] <-- unfortunately I have no idea what your problem might be, sorry

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    maitai
                    wrote on last edited by
                    #9

                    I was using msvc2010/express and my problem came from that. I am now compiling with msvc2012/express and although I cannot compile my application in 64bits from inside qtCreator because msvc express edition does not contain the necessary scripts to initialize the 64bits compilator, I can anyhow build it from the 64bits msvc2012 command prompt. So it's ok with me since I can develop in 32 bits mode and only build in 64bits when deploying...

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved