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. [Solved]How to build 64-bit application
Forum Updated to NodeBB v4.3 + New Features

[Solved]How to build 64-bit application

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 22.6k Views 1 Watching
  • 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.
  • D Offline
    D Offline
    DouDou
    wrote on 8 Mar 2012, 03:07 last edited by
    #1

    How can we build a 64-bit application with Qt for Windows?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on 8 Mar 2012, 07:59 last edited by
      #2

      That is dependent on the environment you like to use. For instance you may use the 64 bit version of mingw "(see tag for further threads on this topic).":https://qt-project.org/search/tag/mingw~64~bit
      In addition you can use the various versions of visual studio for 64 bit compilations.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DouDou
        wrote on 8 Mar 2012, 12:16 last edited by
        #3

        [quote author="koahnig" date="1331193597"]That is dependent on the environment you like to use. For instance you may use the 64 bit version of mingw "(see tag for further threads on this topic).":https://qt-project.org/search/tag/mingw~64~bit
        In addition you can use the various versions of visual studio for 64 bit compilations. [/quote]

        Thanks for the reply. My question is on how to access it from Qt creator like in Visual Studio you can change the target machine with configuration manager from Win32 to x64. I cant find a similar option in Qt creator, the only thing I was able to find under 'options > build & run > tool chains' was the 'Microsoft Visual C++ Compiler 10.0 (x64)' under 'Auto-Detected', however selecting that and clicking 'apply' didnt have any effect on the project, because when i try to build it, it is still coming out as a 32-bit application.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on 8 Mar 2012, 14:13 last edited by
          #4

          DouDou: Tools>Options>Build & Run>Tool chains lists all tool chains creator was able to detect. Which one gets used depends on your project: Check Project>Build Settings, that should have a drop down box with all the tool chains that can produce code for the Qt version you have selected.

          So to do 64bit Qt apps for windows in Qt Creator you need a 64bit Qt first. If you remove Qt from your qmake project, then creator offers to use any of the available tool chains for building.

          Note that we do "best effort" when it comes to picking a mkspec to build, please check the -spec argument of the qmake step and make sure it is sensible:)

          1 Reply Last reply
          0
          • D Offline
            D Offline
            DouDou
            wrote on 8 Mar 2012, 17:19 last edited by
            #5

            [quote author="Tobias Hunger" date="1331216020"]DouDou: Tools>Options>Build & Run>Tool chains lists all tool chains creator was able to detect. Which one gets used depends on your project: Check Project>Build Settings, that should have a drop down box with all the tool chains that can produce code for the Qt version you have selected.

            So to do 64bit Qt apps for windows in Qt Creator you need a 64bit Qt first. If you remove Qt from your qmake project, then creator offers to use any of the available tool chains for building.

            Note that we do "best effort" when it comes to picking a mkspec to build, please check the -spec argument of the qmake step and make sure it is sensible:)[/quote]

            Thanks, two questions:

            a) where can I download Qt-64bit for Windows
            b) How do i remove Qt from the qmake project?

            Sorry for the very studpid questions, have been using Qt for 3 days only

            1 Reply Last reply
            0
            • D Offline
              D Offline
              DouDou
              wrote on 9 Mar 2012, 17:12 last edited by
              #6

              Okay, i figured it out. Currently Qt does not have official 64-bit binaries, so you will have to build those yourself, which is very easy if you have Visual Studio 2010. Download the Qt source and then go to Visual Studio x64 command prompt and build Qt from there.

              1 Reply Last reply
              0
              • T Offline
                T Offline
                tobias.hunger
                wrote on 9 Mar 2012, 20:11 last edited by
                #7

                To disable Qt in a qmake project you can do this:
                @
                CONFIG -= qt
                QT -= core gui
                @

                The first one will suffice with with qmake and a recent Qt Creator (> 2.4.x). Earlier creators need the second line to detect that you do not want Qt.

                1 Reply Last reply
                0

                1/7

                8 Mar 2012, 03:07

                • Login

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