[solved] [, well in a way] Can't compile a thing!
yesterday (27.03) I've downloaded the
Qt 5.0.1 for Linux 32-bit (388 MB)
and run the setup.
That looked okay.
But whatever I compile (even the samples) lead to exact the same error messages. The error seems to be in an #ifdef block that wraps code for apple. That's odd since I am pretty sure I am running Ubuntu 12.10.
Anyone an idea?
It's a bit of an urgent issue for me, since I am blocked until I get the Qt Creator IDE into an working state.
Thanks in advance.
21:12:12: Führe Schritte für Projekt Test aus...
21:12:12: Unveränderte Konfiguration, qmake-Schritt wird übersprungen.
21:12:12: Starte "/usr/bin/make" -w
make: Entering directory
/home/Kysymys/Dev/QT/Test/Test-build-Desktop_Qt_5_0_1_GCC_32bit-Debug' g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_QUICK_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/mkspecs/linux-g++ -I../Test -I../Test/qtquick2applicationviewer -I/media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include -I/media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include/QtQuick -I/media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include/QtQml -I/media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include/QtNetwork -I/media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include/QtGui -I/media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include/QtCore -I. -I. -o main.o ../Test/main.cpp In file included from /media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include/QtQuick/qquickwindow.h:47:0, from /media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include/QtQuick/qquickview.h:45, from /media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include/QtQuick/QQuickView:1, from ../Test/qtquick2applicationviewer/qtquick2applicationviewer.h:14, from ../Test/main.cpp:2: /media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include/QtGui/qopengl.h:99:21: fatal error: GL/gl.h: No such file or directory compilation terminated. make: Leaving directory/home/Kysymys/Dev/QT/Test/Test-build-Desktop_Qt_5_0_1_GCC_32bit-Debug'
make: *** [main.o] Error 1
21:12:13: Der Prozess "/usr/bin/make" wurde mit dem Rückgabewert 2 beendet.
Error while building/deploying project Test (kit: Desktop Qt 5.0.1 GCC 32bit)
Bei der Ausführung von Schritt 'Make'
It seems that you don't have the OpenGL dev lib installed (hinted by the fatal error GL/gl.h missing)
Okay I guess that "you don't have the OpenGL dev lib installed" somehow contains the information how to solve the problem. But as I am as new to linux as I am to QML, it does not.
Could you please elaborate?
[quote author="SGaist" date="1364508162"]Hi,
It seems that you don't have the OpenGL dev lib installed (hinted by the fatal error GL/gl.h missing)[/quote]
It's not QML that is at fault right now.
[quote author="Kysymys" date="1364502362"]Hi there,
/media/Kysymys/Backup/SDK/Qt5.0.1/5.0.1/gcc/include/QtGui/qopengl.h:99:21: fatal error: GL/gl.h: No such file or directory
This means that the compiler can't find gl.h that should be located in a folder name GL, on linux usually /usr/local/include.
Header files for development are usually found in ***-dev package on Ubuntu. In your case, IIRC it should be in mesa-common-dev. So you have to do something like:
@sudo apt-get install mesa-common-dev@
Or use the graphical package manager that comes with Ubuntu
Hope it helps
Great! That helped.
But now it's the linker complaining:
:-1: Error:cannot find -lGL
Is there a list of stuff I have to install to get Qt 5 in a working state? Maybe even a package?
So now I've randomly installed some stuff that looked GL isch. One of which seems to have done the trick.
I am pretty sure that there has to be a better way to get Qt 5.0 running, than just hitting install on anything that says "mesa".
There has to be a thingy hidden somewhere, that installs a functioning version of Qt 5.0 ( meaning download, install, run qt-creator, actually run the samples, no hassle )
So if someone finds that, please inform me.
@SGaist: Thanks again.
You're welcome !
I must say I'm surprised that libGL wasn't already installed on your system. IIRC it's a common library.
Most dependencies needed for Qt are described in the compilation/installation guide for "Qt 5 from git":http://qt-project.org/wiki/Building_Qt_5_from_Git
The goal of the installer is to provide the experience you want. I think you where a victim of bad luck.
Since you found a solution to your problem, could you update the threads title to solved so that other forum users know that you succeeded ?
Updated to [solved]
... will be back with more noobish stuff ...
I had the same issue with Mint14 (32bit). Using Software Manager and installing "libgl1-mesa-dev" fixed the issue. Examples are now building and running fine