Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. How to set up Qt 5.2 to compile for 64 Bit windows application
Forum Updated to NodeBB v4.3 + New Features

How to set up Qt 5.2 to compile for 64 Bit windows application

Scheduled Pinned Locked Moved Installation and Deployment
3 Posts 2 Posters 4.0k 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.
  • N Offline
    N Offline
    natter
    wrote on last edited by
    #1

    I`m not an experienced c++ programmer, but I need to built a program for a 64bit system. (please don't tell me, that 64bit is not necessary - I have a simulation with around 500.000.000 particles needing easily 32 GB). At first I wanted to use MinGW64, but this proved to be quit difficult. So I installed vs2012 and the fitting official installation package for qt 5.2. While this worked out in principal, I was quit dissapointed of how poorly c++11 features were supported. I started to learn c++ quit recently, and therefore my program uses a lot of new language features.
    Even after I changed a lot of code, just to make it compatible with vs2012 compiler, I still had a nasty bug in my program. When I realized after several hours of debugging, that the problem is a wrong implementation of an STL feature (generate_canonical) I decided, that vs2012 is not an option for me.
    So I tried again to get a setup with minGW64 but even after several days of searching and testing, I'm still unable to compile a 64Bit program. It seems, there is no good explanation out there, on how to setup up an additional compiler for Qt Creator. This is really frustrating. My best chance might be a prebuilt as I downloaded for example from "mingwbuilds":http://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/Qt-Builds/
    But even for these packages I'm not able to configure a Kit in QtCreator, and I have not found any helpful tutorial on this topic. Could anybody please give some hints on how to setup such a mingwbuild or give a link to an easy tutorial? I can't believe that it is so hard to compile with Qt 5.2 for a platform not suppported by an offical installing package, especially since this ability is one of the main reasons to use Qt. Thanks for any help.

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi,

      For general configuration:

      See "Adding Compilers":http://qt-project.org/doc/qtcreator-3.0/creator-tool-chains.html to tell Qt Creator where to find your compiler

      See "Adding Qt Versions":http://qt-project.org/doc/qtcreator-3.0/creator-project-qmake.html to tell Qt Creator where to find the Qt binaries that were built using that compiler

      Finally, see "Adding Kits":http://qt-project.org/doc/qtcreator-3.0/creator-targets.html to tell Qt Creator how to combine your compiler with the Qt binaries.

      For the MinGW-builds prebuilt binaries, the instructions are below the download links.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • N Offline
        N Offline
        natter
        wrote on last edited by
        #3

        Thanks for your reply. I already tried to do what these links suggest, but it didn't work.

        "mingwbuilds":http://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/Qt-Builds/
        As far as I understood, I only hav to run "QTDIR\qtbinpatcher --nobackups" for the MinGW-builds.

        "Adding compiler":http://qt-project.org/doc/qtcreator-3.0/creator-tool-chains.html
        To select the compiler in QtCreator was more complicated. I found several exe-files, which seemed to be compilers. I chose
        "Qt-5.2.0-x86_64\bin\x86_64-w64-mingw32-gcc-4.8.2.exe
        (I selected Tools > Options > Build & Run > Compilers > Add->minGW; or should I chose custom? But than I do not know what to add for make path, header path etc.). I have no idea about "Platform codegen flags" so this field is empty.

        "Adding Qt versions":http://qt-project.org/doc/qtcreator-3.0/creator-project-qmake.html
        I think that one was easier. I added "C:\Qt\Qt-5.2.0-x86_64\bin\qmake.exe"

        I created a kit with this Qt version and the compiler (I have no idea about the debugger). But when I try to run my program in QtCreator I get an error:

        qtcreator_ctrlc_stub: Command line failed: mingw32-make.exe

        I don't know what to do about this. mingw32 doesn't sound like the 64 bit program I hope to achive. I found a hint via google to add a path to the Environment variables - but that didn't help. Any suggestions?

        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