[Qt-interest] Installing 4.5 SDK on Linux

JD Guzman lostinthecode at googlemail.com
Fri Apr 3 10:53:36 CEST 2009


Judy Duncan wrote:
> Thanks so much Donal! 
>  
> That gets me closer.  Now when I try to compile the simplest "Hello 
> World" project, I get the output below.
> The ld linker is complaining that it cannot find a library called 
> freetype, which is a font rendering engine.  When I use the Synaptic 
> Package Manager on my system I see a libfreetype6 and 
> libfreetype6-dev.  The libfreetype6 shows as already being installed.
>  
> There is a libfreetype.so.6.3.18 in /usr/lib.  I tried adding this to 
> my path but I still get the same results.  Any suggestions?  (Sorry to 
> take your time with such trivial stuff)
>  
> Thanks... Judy
>  
> --- output from make ----
> g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB 
> -DQT_CORE_LIB -DQT_SHARED -I../../qtsdk-2009.01/qt/mkspecs/linux-g++ 
> -I. -I../../qtsdk-2009.01/qt/include/QtCore 
> -I../../qtsdk-2009.01/qt/include/QtGui 
> -I../../qtsdk-2009.01/qt/include -I. -I. -I. -o main.o main.cpp
>  
> g++ -Wl,-O1 -Wl,-rpath,/home/judy/qtsdk-2009.01/qt/lib -o chap1-1 
> main.o    -L/home/judy/qtsdk-2009.01/qt/lib -lQtGui 
> -L/home/judy/qtsdk-2009.01/qt/lib -L/usr/X11R6/lib -pthread -lfreetype 
> -lgobject-2.0 -lSM -lICE -pthread -pthread -lXrender -lfontconfig 
> -lXext -lX11 -lQtCore -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -ldl 
> -lpthread
> /usr/bin/ld: cannot find -lfreetype
> collect2: ld returned 1 exit status
> make: *** [chap1-1] Error 1
> ----------------------------------------------------
>  
> --- content of project file created by qmake ---
> TEMPLATE = app
> TARGET =
> DEPENDPATH += .
> INCLUDEPATH += .
>
> # Input
> SOURCES += main.cpp
> -------------------------------------
>  
>  
>
> ------------------------------------------------------------------------
> *From:* Donal O'Connor [mailto:donaloconnor at gmail.com]
> *Sent:* Thursday, April 02, 2009 5:15 PM
> *To:* Judy Duncan
> *Cc:* qt-interest at trolltech.com
> *Subject:* Re: [Qt-interest] Installing 4.5 SDK on Linux
>
> Try
>
> $ sudo apt-get install build-essential
>
> You need g++ in your PATH environmental variable
>
> export PATH=$PATH:/path/to/g++ (it should usually be in /usr/bin/g++)
>
> On Fri, Apr 3, 2009 at 1:16 AM, Judy Duncan <jduncan at duncanimaging.com 
> <mailto:jduncan at duncanimaging.com>> wrote:
>
>     The new 4.5 SDK is a great starting point for someone new like
>     myself, but it's confusing because the books and installation
>     documentation were written before the SDK packaging.  Installing
>     under Ubuntu 8.1, I downloaded the SDK bin file, made it
>     executable, and ran it.  Qt Creator comes up fine, but the make
>     files refer to g++ for CXX entry and when I try to do any of the
>     examples from bash, the environment isn't correct.
>      
>     Do I do all of the steps from the earlier install instructions...
>     i.e. run the Configure script, build libraries??
>     On this platform, gcc is recognized - but not g++.  How can I
>     change this?
>      
>     Thanks in advance,
>     Judy
>
>     _______________________________________________
>     Qt-interest mailing list
>     Qt-interest at trolltech.com <mailto:Qt-interest at trolltech.com>
>     http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>   
I had the same issues you are having and after adding a symbolic link 
for the freetype lib it said it couldn't find gobject.  Rather than 
going through and trying to resolve these errors one by one I suspected 
that it was an install issue and reverted to trying to install Qt 
through the package manager.  Now everything works fine.

If you would like to try this on your machine you can find a 
qt-dev-tools package in the package manager as well as creator, 
designer, and the doc browser.  Picking those should install everything 
you need.

Cheers

JD



More information about the Qt-interest-old mailing list