Results 1 to 6 of 6

Thread: Installed Qt SDK in Linux, errors building examples

  1. #1
    Join Date
    May 2010
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Installed Qt SDK in Linux, errors building examples

    I installed the Qt SDK for Linux/X11 32-bit on a system using Red Hat Enterprise Linux 5. When I try to build some of the simple examples in Qt Creator, I get errors. Here is the error I get when I attempt to build the SDI example:

    g++ -Wl,-rpath,/home/user/qtsdk-2010.02/qt/lib -o sdi main.o mainwindow.o moc_mainwindow.o qrc_sdi.o -L/home/user/qtsdk-2010.02/qt/lib -lQtGui -L/home/user/qtsdk-2010.02/qt/lib -L/usr/X11R6/lib -lQtCore -lpthread
    /home/user/qtsdk-2010.02/qt/lib/libQtGui.so: undefined reference to `FcFreeTypeQueryFace'
    collect2: ld returned 1 exit status
    make: Leaving directory `/home/user/qtsdk-2010.02/qt/examples/mainwindows/sdi'
    make: *** [sdi] Error 1
    Exited with code 2.
    Error while building project sdi
    When executing build step 'Make'
    Any idea what the cause of these errors are? Any help would be greatly appreciated.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Installed Qt SDK in Linux, errors building examples

    Have a look at the requirements for Qt on X11: http://doc.trolltech.com/4.6/requirements-x11.html. Seems you are missing Free Type.

  3. #3
    Join Date
    May 2010
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Installed Qt SDK in Linux, errors building examples

    I had an older version of FreeType installed in /usr/local, but thinking that maybe Qt4 needed a newer version, I downloaded and built the latest version of FreeType, and installed it in the same location (/usr/local). This does not fix the problem, I get the same error. here is the version of FreeType I have installed:

    [user@localhost ~]$ freetype-config --version
    10.0.4
    [user@localhost ~]$ freetype-config --ftversion
    2.3.12

    Could this be an environment variable issue, or Qt4 looking in another path for FreeType?

  4. #4
    Join Date
    May 2010
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Installed Qt SDK in Linux, errors building examples

    Do I need to build qmake? The qmake executable already exists in the sdk. I just don't know what I need to do to get Qt working for me.

  5. #5
    Join Date
    Feb 2008
    Posts
    491
    Thanks
    12
    Thanked 142 Times in 135 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: Installed Qt SDK in Linux, errors building examples

    On my Debian system 'FcFreeTypeQueryFace' is defined in fcfreetype.h which is in the development package of libfontconfig1. The Debian package name is "libfontconfig1-dev". Do you have all of the recommended dev packages installed as per Lykurg's link?

  6. #6
    Join Date
    May 2010
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Installed Qt SDK in Linux, errors building examples

    Quote Originally Posted by norobro View Post
    On my Debian system 'FcFreeTypeQueryFace' is defined in fcfreetype.h which is in the development package of libfontconfig1. The Debian package name is "libfontconfig1-dev". Do you have all of the recommended dev packages installed as per Lykurg's link?
    Ok, I got it working. For some reason the version of FontConfig installed on my system wasn't working with Qt (either because it was a too-old version, or it was installed in a location that Qt didn't look at). I installed the source for the latest version of FontConfig and built it, and now I can compile and run Qt projects.

Similar Threads

  1. Building on msvc without and excluding examples
    By negritot in forum Installation and Deployment
    Replies: 4
    Last Post: 16th April 2010, 06:52
  2. Why is this so hard. (Building examples)
    By ohlfsen in forum Newbie
    Replies: 10
    Last Post: 26th February 2010, 10:40
  3. Prblem in Building and running Examples.
    By Tarun in forum Qt Programming
    Replies: 1
    Last Post: 21st January 2010, 13:45
  4. ask from developers who have installed qt4.6-linux
    By navid in forum Qt Programming
    Replies: 3
    Last Post: 12th December 2009, 21:19
  5. Qt 4.1.0 - static examples run with errors!
    By Elder Orb in forum Qt Programming
    Replies: 1
    Last Post: 12th January 2006, 09:40

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.