Installation is a mess !



  • I have just spent 3 unproductive hours trying to get a working QT 4.8 system on Windows 7 with Visual Studio 2008. I downloaded the Qt libraries for Visual Studio 2008 and Qt Creator. Qt creator cannot find the compiler. I have no idea what it wants me to do. I have tried adding a compiler to the desktop kit but I have no idea what I need to add.

    I gave up on that after seeing a comment on the internet 'Why not just use MingW - it is built in ?' I uninstalled the version for VS2008 and downloaded the version fo MingW. That won't install - it is plainly NOT built-in.

    I found a comment about installing a deprecated SDK in order to get MingW. Helpfully it gave the site. This wants to install QT Creator as well as MingW - is that going to screw up the version of Qt creator that I installed successfully ? I don't want to risk it.

    What the hell is going on ? Should it really be this difficult to get a working version of Qt. Al that is needed is some clear up-front instructions of what to do !

    I have now given up as it really is not worth all this effort.



  • Hi,

    Any reason why you want to use 4.8 instead of 5.0.2?

    If I needed 4.8 I would start with installing 5.0.2:
    "Qt 5.0.2 for Windows 32-bit (MinGW 4.7, 650 MB) ":http://download.qt-project.org/official_releases/qt/5.0/5.0.2/qt-windows-opensource-5.0.2-mingw47_32-x86-offline.exe

    And then just download the "library for 4.8":http://download.qt-project.org/official_releases/qt/4.8/4.8.4/qt-win-opensource-4.8.4-mingw.exe and place it in the Qt folder so that I have:

    C:\Qt\Qt5.0.2 and C:\Qt\Qt4.8.4

    Qt 5.0.2 comes with Qt Creator 2.7.0. You can have several libraries and Qt Creators, as long as they are in different folders, it will not be a problem.



  • Your case would have been helped by asking for help rather than making your first post a dummy spit.

    Qt installation is about as simple as it can get:

    • Ensure your system has a working MSVC 2008 compiler toolchain. This step has nothing to do with Qt but clearly Qt cannot use the tool chain unless it works.
    • Install the Qt4.8.4 library build for MSVC2008
    • Install the Qt Creator build
    • Run Qt Creator from an environment set up for MSVC command line compilation important.
    • Tell Qt Creator where you installed the Qt library(-ies): Tools, Options, Build & Run, Qt Versions
    • Tell Qt Creator where your compiler(s) are: Tools, Options, Build & Run, Compilers
    • Make a Kit that combines a compiler with a set of Qt Libraries: Tools, Options, Build & Run, Kits
    • Start a new project using the Kit.

    Qt Creator is designed to handle multiple compiler vendors, versions, matching Qt library versions and allow switching between them within one project; Kits achieve that. Unlike the Microsoft monoculture, which assumes you want to use their tools and only their tools on Windows, Creator has to be flexible.

    If you want to try again feel free to tell us where the wheels come off for you.

    Edit: If you don't want to use Qt Creator then that's possible too.


  • Moderators

    Gennon, that won't work because Qt 5.0.2 comes with MinGW 4.7 -- that is NOT compatible with the precompiled Qt 4.8, because that was built using MinGW 4.4.

    elpidiovalde, do you need to use Qt 4.8? If not, I highly recommend getting Qt 5 instead. Your life will be much easier.

    Here are the steps for getting each version of Qt:

    Qt 5.0.2

    Uninstall the Qt Creator that you have

    Download and install Qt 5.0.2 for Windows 32-bit (MinGW 4.7, 650 MB) -- it comes with MinGW 4.7 and Qt Creator

    Launch the Qt Creator that came from this package and start coding (it's that easy)

    Qt 4.8.4

    Download and install "Visual C++ 2010 Express":http://www.microsoft.com/visualstudio/eng/downloads#d-2010-express (skip this if you already have VS 2008)

    Download and install Qt libraries 4.8.4 for Windows (VS 2010, 234 MB) -- it does NOT come with a compiler or Qt Creator (get the 2008 package if you have VS 2008)

    Launch the Qt Creator that you installed before (I presume it was Qt Creator 2.7.1? If not, upgrade it to 2.7.1)

    Qt Creator might auto-detect your compiler, but probably won't auto-detect Qt. Follow the instructions on these pages to add what you need:

    "Adding a compiler":http://doc-snapshot.qt-project.org/qtcreator-2.7/creator-tool-chains.html

    "Adding Qt":http://doc-snapshot.qt-project.org/qtcreator-2.7/creator-project-qmake.html

    "Adding a Kit":http://doc-snapshot.qt-project.org/qtcreator-2.7/creator-targets.html (a kit groups your compiler with your Qt version. When you create a project, you need to select a valid kit)

    Start coding

    Just FYI, Qt is a software library. Like other software libraries (such as GTK or wxWidgets or Tcl/Tk), it doesn't usually come with a compiler. The Qt 5.0.2 MinGW package is an exception.



  • Thanks to Gennon, ChrisW67 and JKSH for your replies, all of which are helpful. After getting some sleep I have indeed decided to do battle again with the QT installation.

    I wanted to use Qt 4.8 because this is what I use on my main machines running Ubuntu 12.04 and Lubuntu 12.04. As I understand it Qt 4.8 is the version in Synaptic for Qt and, I presume the recommended version for Ubuntu 12.04. I hoped to use a windows machine to do a little development from time to time. I will try to use Qt5. It won't be a problem if it's library does not differ too drastically from 4.8.

    I just never expected to enter such a rabbit-hole installing the 4.8 libraries. A few instructions on where to find the appropriate compilers on the download site would have saved me a lot of thrashing about.


  • Moderators

    You're welcome :) The first step is always the hardest; I hope your Qt journey gets a lot more enjoyable from here on!

    I'm not a fan of Ubuntu's Qt 4.8 packages. For some reason, they modified Qt's structure and merged the "main" multimedia module into the "mobility" multimedia module -- I found this out the hard way last year when my Windows-developed project refused to compile on Ubuntu and I wasted a few hours trying to figure out why. I don't know if they did that with any other modules, or if they've improved recently, but I never got Qt through Synaptic again.

    You can download "Qt 5.0.2 for Linux 32-bit (395 MB)" to get Qt 5 on Ubuntu. It's similar to the MinGW bundle, but remember to get the g++ compiler from Synaptic.

    [quote author="elpidiovaldez5" date="1372074981"]A few instructions on where to find the appropriate compilers on the download site would have saved me a lot of thrashing about. [/quote]That's Google's job ;)

    Seriously though, it's reasonable to assume that the vast majority of the visitors to that page already know C++, i.e. already have experience with obtaining and using compilers. The Downloads page is already cluttered enough without adding links to the multitude of compilers that Qt supports.





  • I am now using QT 5 with Windows. The installation of this was a breeze. It DOES come with the appropriate compiler. I would have used Qt5 to start with if I had known Qt4.8 installation was going to be messy. I had a reason to want Qt4.8, but not strong enough to go through a lot of pain.

    Eventually I will try to get Qt5 on my Ubuntu 12.04 64 bit system to keep the versions the same on all my machines. Just worried that it is not in Synaptic for a reason.

    Thanks again to the people who helped me.


  • Moderators

    It's not in Synaptic simply because Ubuntu 12.04 is older than Qt 5 :) Packages used to be updated only when the distro is updated, so they'd always be behind. I think Ubuntu's PPA system is speeding things up, but I'm not sure if Qt is using that. Anyway, you'll find Qt 5 in the official Ubuntu 13.04 repository.

    Anyway, happy coding!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.