Results 1 to 13 of 13

Thread: How to install Qt 4.7 from binary on Ubuntu 11.04

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Jan 2011
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: How to install Qt 4.7 from binary on Ubuntu 11.04

    I added Qt to my system's path using this command:
    Qt Code:
    1. export PATH=$PATH:...
    To copy to clipboard, switch view to plain text mode 
    then qmake worked smoothly.

    But got one more issue, the make command yield this error:
    Qt Code:
    1. QApplication: no such file or directory
    To copy to clipboard, switch view to plain text mode 
    I guess that g++ can't locate Qt Libraries.. !

    well I found that thread in Ubuntu forums:
    http://ubuntuforums.org/archive/index.php/t-231764.html

    by asimon
    :
    ....
    You need to tell g++ where to find the include files. I.e. something like

    $ g++ -I/usr/include/qt4/include foo.cpp

    But this is not enough. You also need to tell it what libraries to link against, i.e. something like

    $ g++ -I/usr/include/qt4/include -L/usr/lib/include/qt4/lib -lQtGui -lQtCore -lpthread foo.cpp

    You should better use some automation here, like for example Qt's qmake. I.e. put your foo.cpp program in a directory called 'foo' and run 'qmake -project'. That will scann the current directory for source files and create a foo.pro project file. Then call 'qmake' which generates a Makefile from the .pro file. Then a simple 'make' will build you program 'foo' and if everything works as expected it should take care of all the needed compiler options.
    :
    ...
    So, is it really that g++ can't locate my Qt Libraries? If so, how to solve it?
    Or just I didn't add path correctly? If so, how to do it right ?

    ---------------------

    @HelderC:
    I think better you install it from Synaptic.
    Sure it's far better, but installing more than 300 mega bytes with a slow and unstable connection is a big issue for me.
    that because I've a slow Internet connection on th Linux machine, so I can't use internet to download it.

    Thanks all for replaying.
    Last edited by ibn-tashfin; 11th January 2011 at 20:08. Reason: spelling corrections

Similar Threads

  1. Replies: 5
    Last Post: 6th February 2011, 13:51
  2. how to install QT on Ubuntu?
    By waxwings in forum Installation and Deployment
    Replies: 2
    Last Post: 3rd July 2009, 11:34
  3. Replies: 0
    Last Post: 14th May 2009, 12:31
  4. "make install" doesn't install binary
    By jiveaxe in forum Newbie
    Replies: 2
    Last Post: 2nd January 2008, 13:00

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.