How to compile qtcreator 2.6.0 against qt 4.8.4 ( and where is the qtsdk ? )



  • Hi
    I am refering to this webpage:

    http://qt-project.org/downloads

    and the version 2.6.0 of qtcreator and the version 4.8.4 of the qt library.
    First, as far as I understand from googling around is that previously qtcreator was part of the qtsdk, but that this is not the case any more.
    Second, I can't find a QtSDK on the download page, only a qt library and qt creator. Am I missing something ?
    Third, how do I compile qtcreator against these libraries ( supposing I have compiled the library first ). In particular, I wonder how I am supposed to tell qtcreator.pro where to find the qt library to build against.
    From looking at the .pro or the Makefile, I don't see any hook.

    Thanks for your help


  • Moderators

    The old SDK by Nokia is available at the bottom of the Downloads page. Not that hard to find, but it is very outdated. Currently, there is no open source version of the SDK (there is a commercial one) for Qt 4, but it is planned and in the making.

    Build instructions for Qt Creator are in the README file. In general it's enough to add <qt dir>/bin to PATH and set QTDIR to the directory where Qt resides, and then run qmake qtcreator.pro and make (preferably in a new directory, as in-source builds are not recommended for QtC). You can of course grab the precompiled version from the Downloads page if you prefer (the same goes to Qt libs).



  • Thanks, that pointed me to the right direction.

    Here is the complete procedure for installing Qt 4.8.4 and QtCreator 2.6.0 on ubuntu 12.04 ( 64 ):

    • download qt-everywhere-opensource-src-4.8.4.tar.gz
    • download qt-creator-2.6.0-src.tar.gz

    $ tar xzvf qt-everywhere-opensource-src-4.8.4.tar.gz
    $ cd qt-everywhere-opensource-src-4.8.4
    $ ./configure -prefix ./build -release -opensource -shared -qt-sql-sqlite -plugin-sql-sqlite ..<other options>

    Notes:

    • sqlite support seems to be required/desirable for qtcreator ( to access *.db files in ~/.conf ), without the related options -qt-sql-sqlite -plugin-sql-sqlite , I got error messages when starting qtcreator
    • contrary to what is explained here http://doc.qt.digia.com/qtcreator-extending/getting-and-building.html, I did not need the -developer-build option
    • I did need to compile with the qdeclarative option, qtcreator won't compile without qdeclarative support enabled.

    $ make && make install
    This will install qt in qt_dir/build where qt_dir is the dir where the tarball was extracted to.

    Now to qtcreator:
    $ tar xvzf qt-creator-2.6.0-src.tar.gz
    $ cd qt-creator-2.6.0-src
    $ mkdir build
    $ cd build
    $ qmake ../qtcreator.pro

    Note: for this to work, qmake as produced by the qt compilation must be in your path:
    $ export PATH = qt_dir/build/bin:$PATH
    I did not need to set QTDIR, it seems that everything is deduced correctly from the location of qmake.

    $ make
    You don't need make install for a local install.

    That's it.

    As a sidenote for the record, why I got into this mess was because I used inadvertently a qmake version from the ubuntu repos and a qtcreator from a QtSdk and I wanted to develop plugins for designer. Those plugins were never loaded and the reason was, that the previous qtcreator install used a QT_INSTALL_PLUGINS path as set by the qmake from the ubuntu repos.
    I could see this when setting QT_DEBUG_PLUGINS=1 before starting qtcreator.

    So the newbie-bottom line of all this is:

    do not mix between qt-stuff from the official repos of your dist with compiled-from-source qt-stuff, run *qmake -v * to find out what libs your qmake is refering to.

    make sure you add the correct path to qmake in your PATH env var, again make sure you don't mix qt versions.

    when developing designer plugins (custom widgets) , set QT_DEBUG_PLUGINS=1 to find out where qtcreator is looking for your *.so files.


  • Moderators

    I tend to just give the full path to qmake when running it. That way I know exactly which one will be used:-) Does get rid of this "put QTDIR/bin into PATH", too.



  • Hi Folks

    I am trying to install Qt 4.8.4 opensource with Qt-Creator 2.7.0, and like mycircuit above, I wanted to configure/make/install the 4.8.4 libraries first and then intall Creator 2.7.0. I am using 4.8.4 at work and trying to develop from home while my kid is sick, but not having much luck getting this up and going at home. At work I am using VMWare with preconfigured ISO of Ubuntu 10.04 LTS. At home am running native Ubuntu 12.04 LTS with the following system architecture:
    (Linux:3.5.0-23-generic:x86_64)
    64-bit AMD 80x86 (x86_64)
    'x86_64' is supported
    System architecture: 'x86_64'

    I visited http://qt-project.org/doc/qt-4.8/supported-platforms.html and I don't necessarily see what is the problem with my platform.

    Any help would be much appreciate, and I have only been working in Linux for about 5 months now. I replied to this thread because it had similarity to the original post and I didn't know if I should start a new question.

    Problem:
    After executing the following configure command:
    ~/tmp/qt-everywhere-opensource-src-4.8.4$ ./configure -release -opensource -shared -plugin-sql-sqlite -platform target linix-g++-64 -verbose

    Result:
    linix-g++-64: unknown argument

    The specified system/compiler is not supported:

      /tmp/qt-everywhere-opensource-src-4.8.4/mkspecs/target
    

    Please see the README file for a complete list.

    Thank you!



  • You should really start a new thread.

    Your arguments to configure are incorrect. You probably meant (i.e. drop target and fix typo in linux-g++-64):

    bq. ~/tmp/qt-everywhere-opensource-src-4.8.4$ ./configure -release -opensource -shared -plugin-sql-sqlite -platform linux-g++-64 -verbose

    You can also drop the "-platform linux-g++-64" as configure will auto detect that.


Log in to reply
 

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