PDA

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



gusQt1
6th May 2011, 14:44
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.

hakermania
6th May 2011, 18:41
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:

alex@MaD-pc:/var/www$ which gcc
/usr/bin/gcc
alex@MaD-pc:/var/www$

gusQt1
6th May 2011, 21:18
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

gusQt1
10th May 2011, 21:29
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

MarekR22
12th May 2011, 15:17
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).

gusQt1
13th May 2011, 19:06
Thanks MarekR22
Somehow it is now working and I really did not do anything except reinstall it and run it... Up now.
Thanks all.

ramtinova
2nd October 2011, 14:43
sudo apt-get install g++

http://sheeeng.blogspot.com/2011/07/you-need-c-compiler-message-shown-when.html

fredgillot
19th October 2012, 04:59
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?keywords=Qt&searchon=names&suite=precise&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.

ChrisW67
19th October 2012, 23:14
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:


$ gcc -v
...
gcc version 4.5.4 (Gentoo 4.5.4 p1.0, pie-0.4.7)

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