Results 1 to 9 of 9

Thread: Install Qt-SDK Linux32 "You need a C++ compiler message..?

  1. #1
    Join Date
    May 2011
    Posts
    12
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Install Qt-SDK Linux32 "You need a C++ compiler message..?

    Using Ubuntu_10.04 LTS Linux

    Trying to install Qt - SDK
    Qt_SDK_Lin32_online_v1_1_en.run
    I run it ./Qt_SDK_Lin32_online_v1_1_en.run
    I get the dialog
    "Setup - Qt SDK
    Retrieving information from remote installation sources..."
    It runs for a bit then a dialog comes up...
    "You need a C++ compiler. Please install it using the System Package Management tools."

    Thing is, I do have tools installed at
    home/user/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/bin$
    which does have C++ and gcc etc... etc.... there.
    Can anyone direct me on how to proceed?
    Thank you.

  2. #2
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Install Qt-SDK Linux32 "You need a C++ compiler message..?

    Maybe the installation searches for these files at default bin locations such as /usr/bin/ or /bin/
    Can you have root permissions in your system so as to copy the executables from your custom location to your default one?
    If you need it, 'which program_name' shows the full path of a program's name.
    So, I found i.e. where gcc is located:
    Qt Code:
    1. alex@MaD-pc:/var/www$ which gcc
    2. /usr/bin/gcc
    3. alex@MaD-pc:/var/www$
    To copy to clipboard, switch view to plain text mode 
    When you 're trying to help somebody in the newbie section, don't forget that he is a newbie. Be specific and give examples.

  3. #3
    Join Date
    May 2011
    Posts
    12
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Install Qt-SDK Linux32 "You need a C++ compiler message..?

    That's unfortunately not to clear to me sorry... as I am trying to load from the remote server... yes so how to set up and get beyond the "need C++ compiler... is my trouble..
    Thanks

  4. #4
    Join Date
    May 2011
    Posts
    12
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Install Qt-SDK Linux32 "You need a C++ compiler message..?

    Hello hakermania
    Yes indeed running
    $ which gcc
    does show it located at
    /usr/bin/gcc
    Do you (or anyone) know how to tell the Qt SDK and Qt-creator where the gcc is located ?
    Please see my first message above..
    Thanks

  5. #5
    Join Date
    Nov 2010
    Posts
    315
    Thanked 53 Times in 51 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Install Qt-SDK Linux32 "You need a C++ compiler message..?

    in package manager just install lib-qt4-dev (or something with similar name) package then it should install all required packages including gcc.
    It should work out of the box (I had 10.04 and it worked).

  6. #6
    Join Date
    May 2011
    Posts
    12
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Install Qt-SDK Linux32 "You need a C++ compiler message..?

    Thanks MarekR22
    Somehow it is now working and I really did not do anything except reinstall it and run it... Up now.
    Thanks all.

  7. #7
    Join Date
    Oct 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Install Qt-SDK Linux32 "You need a C++ compiler message..?

    Qt Code:
    1. sudo apt-get install g++
    To copy to clipboard, switch view to plain text mode 
    http://sheeeng.blogspot.com/2011/07/...hown-when.html

  8. #8
    Join Date
    Oct 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Install Qt-SDK Linux32 "You need a C++ compiler message..?

    Quote Originally Posted by MarekR22 View Post
    in package manager just install lib-qt4-dev (or something with similar name) package then it should install all required packages including gcc.
    It should work out of the box (I had 10.04 and it worked).
    Unfortunatly, package manager (or Ubuntu Software Center) doesn't show any qt stuff and obviously, a terminal entry such as $ sudo apt-get install <qt library> fails. How would it know where to find the lib???? So the only remaining option is to download manually from http://packages.ubuntu.com/search?ke...se&section=all and the dependencies (a few hundreds) then install manually.

    Also tried to install CMake, worked fine, but Qt SDK autosetup continue to cry saying there's no C++ compiler.
    Last edited by fredgillot; 19th October 2012 at 04:59.

  9. #9
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Install Qt-SDK Linux32 "You need a C++ compiler message..?

    If you do not have a C++ compiler installed, or the compiler you have is not on the PATH, then it won't be found by default. Do you get a response from:
    Qt Code:
    1. $ gcc -v
    2. ...
    3. gcc version 4.5.4 (Gentoo 4.5.4 p1.0, pie-0.4.7)
    To copy to clipboard, switch view to plain text mode 
    or an error message saying "command not found"? Not found? Install gcc: apt-get install gcc

    Once Qt Creator is installed, run it. Tools menu, Options..., Build & Run, Tool Chains and add if necessary although it should find the GCC on the PATH if present.

    There's plenty of Qt stuff under Development here:
    http://packages.ubuntu.com/precise/devel/ (or lucid etc.)
    http://packages.ubuntu.com/precise/libdevel/

    You probably want qt4-dev-tools which will pull in the bulk of what you need. Other Qt4 libraries live under libqt4-* names in libdevel

Similar Threads

  1. Replies: 4
    Last Post: 25th February 2011, 09:01
  2. Replies: 4
    Last Post: 18th April 2010, 00:37
  3. The compiler error:"cannot find -lQtGuid4"
    By osmanthus in forum Installation and Deployment
    Replies: 1
    Last Post: 7th January 2009, 06:58
  4. Replies: 4
    Last Post: 12th October 2008, 13:47
  5. "make install" doesn't install binary
    By jiveaxe in forum Newbie
    Replies: 2
    Last Post: 2nd January 2008, 12: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.