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 use qt4.8.4 in QtCreator 2.7 with alredy installed Qt5.0.2

How to use qt4.8.4 in QtCreator 2.7 with alredy installed Qt5.0.2

Scheduled Pinned Locked Moved Installation and Deployment
9 Posts 3 Posters 3.1k 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.
  • H Offline
    H Offline
    Hector
    wrote on last edited by
    #1

    I have been using qt5 without any problem. Now i need use the qt4 for a project and i can't compile. I followed the tutorial to add a new QT version to QTcreator and seems no errors, However, when compile a hello world with qt4.8 i find some errrors related with Mingw.

    I haven't installed a new version of Mingw, i've only linked the compiler of qt5. The Debugger is also the same of qt5.

    I'm under Windows XP, but the problem seems the Mingw.

    This is the configuration:
    http://www.subirimagenes.com/imagen-dibujo-8500726.html(Conf Kits)

    This is the errors:
    http://www.subirimagenes.com/imagen-errores-8500731.html(Errors)

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      What version of MinGW was used to compile Qt4? If it was older than 4.7, it is not compatible with the one that is shipped with Qt5.

      (Z(:^

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Hector
        wrote on last edited by
        #3

        The version is the 4.7, but i don't have any problem with Qt5, the problem is with qt4 U;U
        To compile qt4 i used the same version of Mingw

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          Hm OK, it should be working then.

          (Z(:^

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

            Where did you get Qt 4.8 from? Your approach will work only if you compiled the Qt 4 library yourself.

            If you downloaded the precompiled packages from http://qt-project.org/downloads , then you need to use MinGW 4.4 (the link says "Qt libraries 4.8.4 for Windows (minGW 4.4, 317 MB)") People have reported that MinGW 4.5 and 4.6 work too, but MinGW 4.7 is NOT compatible with MinGW 4.4

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

            1 Reply Last reply
            0
            • H Offline
              H Offline
              Hector
              wrote on last edited by
              #6

              @JKSH: Yes, i downloaded the precompiled packages from that page.
              So for the Qt 5 I need the MinGW >= 4.7, but for use Qt 4.8.4 is necessary MinGW 4.4, 4.5 or 4.6, but not 4.7. Senseless. Seems, that i'll need install a old version of MinGW.

              But, have 2 versions of MinGW not cause incompatibilities? I'll need to put the binaries of MinGW 4.4 to PATH, but there I have the binaries of Mingw 4.7... Well, i put and i'll comment the result.

              @JKSH, @sierdzio: really thank you very much for the help =)

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

                You're welcome :)

                [quote author="Hector" date="1371796297"]So for the Qt 5 I need the MinGW >= 4.7, but for use Qt 4.8.4 is necessary MinGW 4.4, 4.5 or 4.6, but not 4.7.[/quote]Correct. But, if you download the Qt 4.8 source code and build the DLLs using MinGW 4.7, then you can use the same compiler for both Qt versions.

                [quote]Senseless.[/quote] I disagree. Qt 4 is a very mature technology that is used by thousands of developers. The Qt Project must maintain compatibility with users' old projects, so it must continue to support MinGW 4.4. I know it's annoying though.

                [quote]But, have 2 versions of MinGW not cause incompatibilities? I'll need to put the binaries of MinGW 4.4 to PATH, but there I have the binaries of Mingw 4.7...[/quote]You're right: It will cause conflicts. It is best to not have 2 versions of MinGW in your PATH.

                Just configure Qt Creator's compilers and kits, and you can build projects without having MinGW in your PATH

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

                1 Reply Last reply
                0
                • H Offline
                  H Offline
                  Hector
                  wrote on last edited by
                  #8

                  @JKSH: Mmm maybe the best option is build dll using MinGW 4.7. I think that is a good idea maintain the compatibility with users old projects, but was a good idea put the same compilator of Mingw to QT4 and QT5 u.u

                  Wll, I have download the source of 4.8. If I want build and compile the Qt 4.8 i must open the Command Prompt of Mingw 4.7 and write qmake -project, after qmake and finishing with a makefile?

                  Thanks again JKSH!! You're my savior :P

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

                    Hi Hector,

                    You don't need to write your own qmake-project. Just follow the instructions at http://qt-project.org/doc/qt-4.8/install-win.html . It was written for Visual Studio so you need to change it a bit:

                    Call "configure", not "configure -platform win32-msvc"

                    Call mingw32-make, not nmake

                    Good luck!

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

                    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