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. Beginner Compiling samples
QtWS25 Last Chance

Beginner Compiling samples

Scheduled Pinned Locked Moved General and Desktop
12 Posts 5 Posters 5.4k 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.
  • E Offline
    E Offline
    Ender1618
    wrote on last edited by
    #3

    Qt Creator never even gave me an option for compiling the example with MinGW (all the options were for the VS compilers I have installed). Is there a guide on how to compile QT so that with would work with VS2010 compiler?

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hardcodes.de
      wrote on last edited by
      #4

      Strange, are you using the open source version of Qt?

      According to "this article":http://doc.qt.digia.com/4.7/install-win.html, you need to compile Qt with the Microsoft Compiler first. Never done it myself before but I will do so in near future.

      while(!sleep){++sheep;}

      1 Reply Last reply
      0
      • H Offline
        H Offline
        hardcodes.de
        wrote on last edited by
        #5

        "This one is much better":http://qt-project.org/wiki/Building_Qt_Desktop_for_Windows_with_MSVC

        while(!sleep){++sheep;}

        1 Reply Last reply
        0
        • ZlatomirZ Offline
          ZlatomirZ Offline
          Zlatomir
          wrote on last edited by
          #6

          Build the Qt framework only if you really need to build it, because you can find already built with VS 2010 binaries to install at the "download section":https://qt-project.org/downloads (look for Qt libraries 4.8.3 for Windows (VS 2010, 235 MB) ) also you will most likely need the Qt Visual Studio Add in, this will install the Qt menu in Visual Studio (scroll down on the same download page and you will find the download there)

          //you can also find the source code for Qt framework - if you decide you need to build it yourself.

          https://forum.qt.io/category/41/romanian

          1 Reply Last reply
          0
          • E Offline
            E Offline
            Ender1618
            wrote on last edited by
            #7

            Ah hah, the original download link fooled me. I see the VS 2010 version now.

            1 Reply Last reply
            0
            • H Offline
              H Offline
              hardcodes.de
              wrote on last edited by
              #8

              Missed that, too. I could swear that wasn't there... :-)

              while(!sleep){++sheep;}

              1 Reply Last reply
              0
              • B Offline
                B Offline
                Boysie
                wrote on last edited by
                #9

                There's a further twist. I too had the error. I have Qt 4.8.3 and Qt Creator 2.6.0 installed on Windows Vista Premium.

                I believe the problem exisits for those who wish to compile Qt projects from within Qt Creator, which ever compiler you choose.

                For compiler, I tried windows MinGW 4.4.0 then MS Visual Studio Express 2010 C++ compiler, on each loading the compiler settings into the Qt Creator Tools->Options->Build & Run->Kits->Compiler and Compiler and CMake settings.

                In both cases I used the code from the Qt 4.8.3 examples dir and building gave the error:

                The process "C:\Qt\qtcreator-2.6.0\bin\jom.exe" exited with code 2.

                I found the reason was there was no Makefile generated because qmake was not run within Qt Creator build configuration. I tried adding it prior to the compile command but to no effect.

                I added the qmake.exe path to $PATH in the Build Environment but no good.

                I added the same to the CtrlPanel->System->Advanced Settings->Environment->PATH

                I could then run qmake from a command prompt, generate the Makefile. I could compile from within Qt Creator then, but not run. I could however run the example executable I'd built from the command-line prompt.

                Hope this helps. I'm quite a fan of Qt, but more so with the Linux installations which seem to run out of the box. The windows installation should do the same and bundle whatever it needs IMOP.

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  Boysie
                  wrote on last edited by
                  #10

                  I should add the MS Visual Studio Express 2010 C++ is free but as the plugin for Qt Creator doesn't work with the Express edition the compiler doesn't seem to call qmake automatically within Qt Creator.
                  I will continue to investigate. The MinGW route may not require a plugin to call qmake but this all shouldn't be necessary IMOP.

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    Boysie
                    wrote on last edited by
                    #11

                    Intriguing. The user environment variable $PATH C:Qt\4.8.3\bin seems enough to allow me to re-build and run the example project from within Qt Creator. Doing the same inside Qt Creator build environment didn't work, so the plugin isn't needed if you use Qt Creator and not MS Visual Studio. Hope this helps.

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      tobias.hunger
                      wrote on last edited by
                      #12

                      @Boysie: I can not follow your description of the problem you ran into.

                      You mention cmake... what has that to do with anything? If you set up a cmake project then creator will of course not run qmake as that is a completely different build system. Creator will make sure the Qt binaries are in the PATH whenever it runs anything. So far I never got any complaints that this fails to work, you are the very first. So what exactly are you doing? What kind of project is it? Did you open it via a CMakeLists.txt file or a whatever.pro file?

                      Yes, development on Linux is much simpler than on Windows, I fully agree with you there. We can not ship the MS tools for building software for legal reasons. There is no way around that. We did put the mingw tools into the Qt SDK, but IIRC don't do so in the stand-alone Qt Creator installer. That is supposed to be as small as possible... people do complain about the download sizes when we include extra stuff, especially those that have a mingw set up already.

                      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