PDA

View Full Version : Missing compiler error in QtCreator and Qt5.1.0 on Lubuntu 13.04



Acamapichtli
11th August 2013, 19:16
I can't compile any program in QtCreator on Lubuntu 13.04. I have this error:

QtCreator needs a compiler set up to build. Configure a compiler in the kit options
First of all, I installed from Synaptic gcc-mingw32 and mingw32 with dependencies, so the list of downloading packages files looked like this:

binutils (version 2.23.2-2ubuntu1) will be installed
binutils-mingw-w64-i686 (version 2.22.90.20120919-0ubuntu1+2) will be installed
binutils-mingw-w64-x86-64 (version 2.22.90.20120919-0ubuntu1+2) will be installed
cpp-4.6 (version 4.6.4-1ubuntu1) will be installed
g++-4.6 (version 4.6.4-1ubuntu1) will be installed
g++-mingw-w64-i686 (version 4.6.3-13ubuntu1+8) will be installed
g++-mingw-w64-x86-64 (version 4.6.3-13ubuntu1+8) will be installed
gcc-4.6 (version 4.6.4-1ubuntu1) will be installed
gcc-4.6-base (version 4.6.4-1ubuntu1) will be installed
gcc-mingw-w64-base (version 4.6.3-13ubuntu1+8) will be installed
gcc-mingw-w64-i686 (version 4.6.3-13ubuntu1+8) will be installed
gcc-mingw-w64-x86-64 (version 4.6.3-13ubuntu1+8) will be installed
gfortran-mingw-w64-i686 (version 4.6.3-13ubuntu1+8) will be installed
gfortran-mingw-w64-x86-64 (version 4.6.3-13ubuntu1+8) will be installed
libc-dev-bin (version 2.17-0ubuntu5) will be installed
libc6-dev (version 2.17-0ubuntu5) will be installed
libstdc++6-4.6-dev (version 4.6.4-1ubuntu1) will be installed
linux-libc-dev (version 3.8.0-27.40) will be installed
manpages-dev (version 3.44-0ubuntu1) will be installed
mingw-w64-i686-dev (version 2.0.3-1) will be installed
mingw-w64-x86-64-dev (version 2.0.3-1) will be installed
mingw32 (version 4.2.1.dfsg-2ubuntu1) will be installed
mingw32-binutils (version 2.20-0.2) will be installed
mingw32-runtime (version 3.15.2-0ubuntu1) will be installed
Then I downloaded newest Qt 5.1.0 for Linux 32-bit from qt-project.org/downloads and I installed it without any problems. In installation options I had checked "gcc".

Then, I created new project. In Kit Selection I had default checked "Desktop Qt 5.1.0 GCC 32bit". I wrote some code, tried to compile it, and I have mentioned error about compiler. I thought QtCreator will detect gcc (or mingw).

In Options window, section "Build & Run", tab Compilers I have nothing. So I added new compiler GCC and set following file:

/home/rafal/Qt5.1.0/5.1.0/gcc/bin/qmake
But I have no idea if is this the right file. I set ABI to: x86, linux, generic, elf, 32 bit, but also I'm not sure about it. Then, in "Kits" tab I added new one, and this one has GCC compiler. I set this kit to default. I go back to the code, I try to compile it once again, and then I have this error:

18:03:16: Running steps for project TestApp...
18:03:16: Configuration unchanged, skipping qmake step.
18:03:16: Could not start process "make"
Error while building/deploying project TestApp (kit: Desktop Qt 5.1.0 GCC 32bit)
When executing step 'Make'
18:03:16: Elapsed time: 00:00.
I also installed g++, and I get the same.

And I don't know what to do.

Can someone help me, please? What am I doing wrong?

ChrisW67
11th August 2013, 23:38
Tell Qt Creator where your compilers are:
Tool > Options > Build & Run > Compiler Tab

While you are at it you should tell it about your Qt versions:
Tool > Options > Build & Run > Qt Versions Tab

and put them to together is combinations you wish to use:
Tool > Options > Build & Run > Kits Tab

You don't need all the MingW stuff unless you are intending to develop for Windows on a Linux machine.

Acamapichtli
12th August 2013, 08:49
Thank you for your reply. But I tried to find compilers, but I'm not sure if I found the right files.

In Build&Run > Compilers I have:

Auto-detected: "GCC (x86 32bit in /usr/bin)
Manual: I added the same file.

In Qt Versions I have:

Auto-detected: At 5.1.0 GCC 32 bit /home/rafal/Qt5.1.0/5.1.0/gcc/bin/qmake

In Kits I have:

Auto-detected: Desktop Qt 5.1.0 GCC 32bit, but I can't change anything in it.

When I make this Kit default, when compiling I get the same error:

09:40:18: Running steps for project TestApp...
09:40:18: Configuration unchanged, skipping qmake step.
09:40:18: Could not start process "make"
Error while building/deploying project TestApp (kit: Desktop Qt 5.1.0 GCC 32bit)
When executing step 'Make'
09:40:18: Elapsed time: 00:00.

So I added a new Kit:

Device type: Desktop
Device: Run locally (default for Desktop)
Sysroot: empty (I don't know if that's needed)
Compiler: GCC (x86 32bit in /usr/bin)
Debugger: GDB Engine <None>
Qt Version: Qt 5.1.0 GCC 32 bit
Qt mkspec: empty

And that's my configuration. Every time I get the same above error. Do I have to attach another files?

ChrisW67
12th August 2013, 21:25
No, but you need to install a complete C++ compiler and tools, which includes make.
https://help.ubuntu.com/community/InstallingCompilers

Acamapichtli
13th August 2013, 10:47
Thank you very much. It works now.
By the way, I had another error "Cannot find -lGL", so I installed libglu1-mesa-dev, and now it works fine.

So, I don't ned to install those compilers which I installed first before installation of QtCreator, but only those from ubuntu page?

ChrisW67
13th August 2013, 21:26
All of the packages with "mingw" in the name are for building Windows executables on Linux host. This is not something you are likely to attempt as a newbie

Acamapichtli
14th August 2013, 09:58
Now I uderstand. Thank you for your help.