PDA

View Full Version : Installing on Linux with gcc



BSchow
26th August 2008, 16:04
Alright, this may be a noob question, but here goes anyway: I'm trying to install Qt on an OpenSUSE box. I've fiddled with this kind of thing before, the process is usually straightforward; I untar the file into a folder, go to that folder, type './configure'...

...and the program seems to want to use g++ to compile things. Problem: I don't /have/ g++; I have gcc, which as I understand is more or less the same thing with a different name. This results in an error and the configuration stopping. I've poked around the forums here and found what I think is a similar problem...apparently I need to change some variable called QMAKESPEC somewhere that points to the /mkspecs folder? Where is this variable?

And what would I change it to anyway? The linux-related folders in the /mkspecs folder appear to be: linux-cxx, linux-ecc-64, linux-g++, linux-g++-32, linux-g++-64, linux-icc, linux-icc-32, linux-icc-64, linux-kcc, linux-llvm, linux-lsb-g++, and linux-pgcc. The last one is the only one that's close to being gcc, so is that the one I should be using?

lvi
26th August 2008, 18:13
GCC is the GNU Compiler Collection. In this collection is g++, the C++ compiler. You will need g++ to compile Qt, since this is written in C++. I guess you could use a different C++ compiler if you really want to, but why not stick with g++...

wysota
26th August 2008, 20:27
In another words you need to install a package called gcc-g++, gcc-c++ or similar.