1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

QT Programming with Debian or Ubuntu Linux - a problem

  1. Jun 18, 2008 #1
    I am running Kubuntu Hardy Heron and I have the same problem I had with Debian, that the Qt packages put the libs and includes all over the place, not in one place such as /usr/lib and /usr/include

    This means that I can't set QTDIR unless I obtain the Qt sources and compile and install in /usr/local/qt but that is a waste of disk space.

    Is there a way to get source code requiring Qt to compile without having to install a second Qt?
     
  2. jcsd
  3. Jun 18, 2008 #2
    This sounds strange. Firstly, no, you don't need to compile Qt from source in order to install the libraries. Synaptic should have a list of the Qt packages - make sure you install the dev packages as well.

    As far as I can recall, Hardy places Qt in /usr/share/qt4 (there are also Qt3 libraries in /usr/share/qt3, but presumably you're working with the latest Qt and don't need these). You don't say precisely what it is that you need to know $QTDIR for, but I'll assume you're trying to compile some sources that rely on the Qt libraries. Have you tried passing

    Code (Text):
    ./configure --with-qtdir=/usr/share/qt4
    prior to building? There are symlinks in that directory that tell the compiler that the Qt libraries and includes are in /usr/share/lib and /usr/share/include.

    Alternatively, you could always just set $QTDIR to the above in your .bashrc.
     
  4. Jun 18, 2008 #3
    It's not a problem when I am compiling source code that comes with a configure script, the script knows where to find the libs and includes. It is a problem when I try to compile code from a tutorial or book.

    I am going to try your suggestion of setting QTDIR to /usr/share/qt4

    thanks
     
  5. Jun 18, 2008 #4
    I think I am on the right track now and all the compile errors have to do with KDE and not Qt.
    This means I need to do for KDE something along the lines of what I did for Qt, following the ideas you gave.

    thanks
     
  6. Jun 18, 2008 #5
    Solved

    I set KDEDIR to /usr/lib/kde4 and this did the trick. I will put that in my ~/.bashrc and the QTDIR as well and also add the $QTDIR/bin and $KDEDIR/bin to my PATH.
     
  7. Jun 18, 2008 #6
    Good! Glad it helped.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: QT Programming with Debian or Ubuntu Linux - a problem
Loading...