Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. (resolved) adding versions of the libraries (was: Creator: size_t/ssize_t not recognized)
Forum Updated to NodeBB v4.3 + New Features

(resolved) adding versions of the libraries (was: Creator: size_t/ssize_t not recognized)

Scheduled Pinned Locked Moved Qt Creator and other tools
33 Posts 3 Posters 13.5k 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.
  • mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by
    #1

    Hi, all -

    I installed 4.8.1 this morning (Windows) and now a once-working program is giving me lots of errors, evidently stemming from an inability to find the definition of size_t and ssize_t. I've reverted to 4.8.0, but the problem persists.

    I do notice in my toolchains that I now have a bunch of MSVC detected before MinGW. I also notice that Creator is invoking one of the MSVC compilers. So, a related question would be, how do I tell Creator which element in the toolchain I want to use?

    Thanks.

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

      The problem is that on windows all compilers seem to try hard to be incompatible with all others:-( So you can not build your code with mingw and then link that against a Qt built with MSVC2010 (or whichever version).

      My guess is that you selected a Qt version built with MSVC for your project. Creator will only offer tool chains that will produce object files that are actually ocmpatible with the Qt version you want to link against. In your case mingw does not seem to be on that list.

      So select a Qt built with mingw and you won't be offered MSVC tool chains anymore.

      PS: Why don't you just fix the issue and make your application built with both mingw and MSVC? That is definitely possible: Creator builds with MSVC, mingw, plain gcc, clang and inter compilers. All compilers will warn/error out about different things, so making sure your code builds with several of them makes sure you do not stray too far from the C++ standard:-)

      1 Reply Last reply
      0
      • mzimmersM Offline
        mzimmersM Offline
        mzimmers
        wrote on last edited by
        #3

        Hi, Tobias -

        So, first off...when you say a "Qt version" does this imply that I need to download a new version of Creator?

        And, I'd love to build with both tool sets. But...how do I choose the tool chain I want to use?

        Thanks.

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

          No, you don't need to re-download Creator. Creator itself doesn't care which version of the Qt libraries, or which compilers, you have. To ensure that your programs build properly, you only need to make sure that your libraries are compatible with your compiler (see http://qt-project.org/downloads#qt-lib -- there are different "versions" of Qt 4.8.3, pre-built for different compilers).

          To choose the tool chain in Creator, go to Tools -> Options -> Build & Run. Then, set your Qt Versions and Tool Chains.

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

          1 Reply Last reply
          0
          • mzimmersM Offline
            mzimmersM Offline
            mzimmers
            wrote on last edited by
            #5

            Hi, JKSH -

            OK, that clears it up (partly). I just downloaded and installed the libraries for MinGW and VS2010.

            Now: how do I get Creator to auto-detect these? Currently it only "finds" my 4.8.0 directory.

            Thanks.

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

              I usually set it up manually myself, but IIRC, for auto-detection to work, the folders containing your compiler and qmake.exe (C:<qt-install-dir>\bin ) must be in your PATH environment variable.

              You can also add them manually via Tools -> Options -> Build & Run -> Qt Versions/Tool Chains -> Add

              Once Qt Creator knows where to find Qt and your compiler, you can set up different "build configurations" (i.e. choose your Qt version & compiler) on a per-project basis by...

              • ... starting a new project (Creator will show you a "Configure Project" window), or
              • ... clicking "Projects" on the left of Creator, while your project is open

              Then, if you've set up multiple build configurations, you can switch between them by clicking on the computer icon on the bottom-left of Creator.

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

              1 Reply Last reply
              0
              • mzimmersM Offline
                mzimmersM Offline
                mzimmers
                wrote on last edited by
                #7

                Hmm...I'm going to pursue the auto-detect route, just to prove that I can make it work. I added the two paths containing the 4.8.3 qmake.exe, but nothing new shows up in my "Qt Versions" window. Do I need to install more than just the libraries?

                FWIW: I put the additions to PATH in my project settings, not into my system-wide properties. I even exited and relaunched Creator...no luck. What step am I leaving out?

                Thanks...

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

                  By "project settings", do you mean .pro file? I'm not sure if that works. The .pro file is for qmake to use... i.e. qmake must already be found before you can give it your .pro file. Furthermore, qmake is compiler-agnostic: It simply creates a Makefile, which Qt Creator then passes to your tool chain.

                  Your options, that I can think of, are:

                  • Add the PATH to your system-wide (or at least user-level) settings, or
                  • Launch Qt Creator through a Batch file that sets a temporary environment before launching Creator

                  Some things to look out for: If I'm not mistaken, Windows 7 and older do not recognize new system-wide PATH variables until you reboot (maybe logout+relogin). If I'm not mistaken again, Windows 8 behaves more sensibly, and PATH additions are immediately usable.

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

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

                    Nope, we run the Qt version auto detection only once and that will pick up whatever is in your PATH at that time. You do not want your Qt versions to change (which will most likely effect all your project configurations!) depending on how you started creator (usually cmd-windows end up having different PATHes set than those used by windows when clicking on the application icon).

                    You will need to register the Qt versions manually. The only way for us to reliably detect all Qt versions installed at any time is to search all your harddrives at startup of creator. That takes way too long to be practical.

                    1 Reply Last reply
                    0
                    • mzimmersM Offline
                      mzimmersM Offline
                      mzimmers
                      wrote on last edited by
                      #10

                      Somehow I missed notification of your replies. So, I tried manually adding 4.8.3 (MinGW) and Creator gives me a message:

                      "Qt version is not properly installed, please run make install"

                      So...what did I do wrong, and where am I supposed to run "make install?"

                      Thanks.

                      1 Reply Last reply
                      0
                      • mzimmersM Offline
                        mzimmersM Offline
                        mzimmers
                        wrote on last edited by
                        #11

                        Any suggestions? I don't mind doing a fresh install if that would get me over this hump.

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

                          Other people got the same error message at http://www.qtcentre.org/threads/35130-Error-quot-QT-version-is-not-properly-installed-please-run-make-install-quot-on-Windows-XP and http://qt-project.org/forums/viewthread/7026 -- not sure if they're the same problem as your, but let's try.

                          Some diagnosis questions:

                          How did you install Qt 4.8.3?

                          How did you install Qt Creator?

                          After you told Qt Creator where to find Qt 4.8.3, did you re-configure your project (or start a new project) to use Qt 4.8.3?

                          One other thing: The pre-built libraries for MinGW are incompatible with the latest MinGW with GCC 4.7; you'll need GCC 4.4. I'm using the MinGW that came with the latest Qt SDK. (However, I don't think this is the cause of your error message. Using an incompatible GCC would still compile successfully, but crash at runtime)

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

                          1 Reply Last reply
                          0
                          • mzimmersM Offline
                            mzimmersM Offline
                            mzimmers
                            wrote on last edited by
                            #13
                            1. I pulled the libraries off of http://qt-project.org/downloads and just ran the installers
                            2. I don't recall
                            3. No...I figured I should get the installation right before trying to use it.

                            Thanks...

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

                              I haven't seen that error before, so I'm not sure what's going on, sorry

                              Since you just ran an official installer, Qt itself should be fine.

                              It might be worth putting your Qt4.8.3\bin folder in your PATH, uninstall Creator, reboot, and reinstall Qt Creator (you can get version 2.5.2 from the download page) -- and have it auto-detect your Qt installation

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

                              1 Reply Last reply
                              0
                              • mzimmersM Offline
                                mzimmersM Offline
                                mzimmers
                                wrote on last edited by
                                #15

                                Hmm...still not working. It found the 4.8.3 directory from PATH, but didn't accept the version of qmake (same error as before). Currently I'm stuck with 4.8.1 for MSVC2010; this is going to pose a real problem very soon.

                                I even uninstalled and downloaded a new copy of the SDK for this effort...not sure where to go from here. I hesitate to file a bug report, since I'm pretty sure I'm doing something wrong, but...options are getting low at this point.

                                1 Reply Last reply
                                0
                                • mzimmersM Offline
                                  mzimmersM Offline
                                  mzimmers
                                  wrote on last edited by
                                  #16

                                  Any suggestions, anyone? The goal is to install and configure Creator in such a way that I can use the 4.8.3 libraries (MinGW and MSVC) at my option. I welcome any suggestions.

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

                                    I'm at a loss, sorry -- no idea what could be the problem, or what to look for. The steps you've taken seem correct to me.

                                    In the Build & Run menu, hover your mouse over the Qt version; it should display a long list of installatio macros/variables, pointing to parts of your installation folder (see screenshot). Does yours look similar?

                                    !http://i.imgur.com/SS9jy.png(Qt installation)!

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

                                    1 Reply Last reply
                                    0
                                    • mzimmersM Offline
                                      mzimmersM Offline
                                      mzimmers
                                      wrote on last edited by
                                      #18

                                      Hovering over my 4.8.1 reveals something similar (though everything is for msvc2010). Hovering over 4.8.3 just says it's an invalid Qt version.

                                      Is it possible that I somehow got a version of Creator that's not compatible with MinGW?

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

                                        AFAIK, Creator is (should be) capable of handling all supported compilers at once; there's no compiler-specific version of Creator, unlike the Qt libraries.

                                        Your error message originated from this source file: http://qt.gitorious.org/qt-creator/qt-creator/blobs/master/src/plugins/qtsupport/baseqtversion.cpp You could try reverse-engineering it to see what Creator thinks is missing

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

                                        1 Reply Last reply
                                        0
                                        • mzimmersM Offline
                                          mzimmersM Offline
                                          mzimmers
                                          wrote on last edited by
                                          #20

                                          OK...I think I have it working now.

                                          For posteriority, here's what I did:

                                          • I deleted everything from my Qt install (using the maintenance tool and then deleting the other directories with the libs, etc.), and reinstalled from scratch:

                                          QtSDK 1.2.1

                                          Qt Libs 4.8.3 (MinGW 4.4)

                                          Qt Creator 2.5.2

                                          • Manually added the MinGW tool chain (even though there was already an entry), selected the g++.exe binary and the pythongdb debugger.

                                          • Manually added 4.8.3 to my Qt Versions.

                                          • Selected 4.8.3 in my build settings.

                                          And now I seem to be back in battery.

                                          Thanks for all the help, JKSH...I appreciate it.

                                          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