Announcement

Collapse
No announcement yet.

Trying to compile kde apps: qt headers and libraries not found [Solved]

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Trying to compile kde apps: qt headers and libraries not found [Solved]

    Hi,

    I'm trying to get started doing some KDE programming, and as an introduction I'm going through the tutorial at http://developer.kde.org/~larrosa/tutorial/index.html. They use a configure script to compile the programs, though, and I haven't been able to get configure to work. Here's the output:

    Code:
    ryan@zt3000:~/kdetutorial-1.2$ ./configure 
    checking build system type... i686-pc-linux-gnu
    checking host system type... i686-pc-linux-gnu
    checking target system type... i686-pc-linux-gnu
    checking for a BSD-compatible install... /usr/bin/install -c
    checking for -p flag to install... yes
    checking whether build environment is sane... yes
    ...
    checking for libjpeg... -ljpeg
    checking for Qt... configure: error: Qt (>= Qt 3.0.2) (headers and libraries) not found. Please check your installation!
    For more details about this problem, look at the end of config.log.
    config.log doesn't seem to offer any clues:
    Code:
    ryan@zt3000:~/kdetutorial-1.2$ tail config.log
    #define SIZEOF_INT 4
    #define SIZEOF_LONG 4
    #define SIZEOF_CHAR_P 4
    #define SIZEOF_CHAR 1
    #define HAVE_LIBZ 1
    #define HAVE_LIBPNG 1
    #define HAVE_LIBJPEG 1
    #define HAVE_LIBPTHREAD 1
    
    configure: exit 1
    I think I have all of the qt development libraries and headers installed. I have libqt3-headers, libqt3-mt-dev, libqt4-core, libqt4-dev, libqt4-qui, and some others.

    /etc/ld.so.conf:
    Code:
    ryan@zt3000:~$ cat /etc/ld.so.conf
    include /etc/ld.so.conf.d/*.conf
    /usr/include/qt3/
    I've run out of ideas! Sure would appreciate your help in getting this set up.

    #2
    Re: Trying to compile kde apps: qt headers and libraries not found

    First, you need to make sure you have all the tools and developer libraries installed. The error is telling you that it cannot find the qt headers, and these sort of packages aren't normally installed as they are useless to anyone not compiling code

    You probably do have at least the basic things you need to compile, I think, but you may need to tell configure where to look for the installed headers and libraries. Most kde-related code these days automatically have configure set to look for the correct location, but sometimes, especially in older packages, it is not there.

    however, it is super super easy to tell configure where to look:
    run configure like this
    Code:
    ./configure --prefix=/usr
    you often have to do this as different distros/OS's may have stuff in different locations

    You can usually see all the options configure can be run with like this
    Code:
    ./configure --help
    you seldom will need to use many of them, but as you move on to more complex packages with more options and features and such, you may use a few more here and there.

    Comment


      #3
      Re: Trying to compile kde apps: qt headers and libraries not found

      Heh heh--well, I got it to work with
      Code:
      ryan@zt3000:~/kdetutorial-1.2/p1$ ./configure --prefix=/usr --with-qt-dir=/usr/lib/ --with-qt-includes=/usr/include/qt3/
      Thanks for the tip!

      Comment

      Working...
      X