Problème de path en compilation qt3
:)Bonjour,
j'ai un problème de compilation en qt3 , voici ce que j'obtiens :
XTERM(terminal émulateur)
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| [cepamonpseudo@localhost courant]$ ls
triangle.cpp
[cepamonpseudo@localhost courant]$ qmake -project
[cepamonpseudo@localhost courant]$ ls
courant.pro triangle.cpp
[cepamonpseudo@localhost courant]$ qmake
[cepamonpseudo@localhost courant]$ ls
courant.pro Makefile triangle.cpp
[cepamonpseudo@localhost courant]$ make
g++ -c -pipe -Wall -W -O2 -DQT_NO_DEBUG -DQT_SHARED -DQT_THREAD_SUPPORT
-I/usr/lib/qt3/mkspecs/default -I. -I. -I/usr/lib/qt4/include
-o triangle.o triangle.cpp
triangle.cpp:2:21: erreur: qstring.h : Aucun fichier ou dossier de ce type
triangle.cpp:3:20: erreur: qcolor.h : Aucun fichier ou dossier de ce type
triangle.cpp:4:21: erreur: qpixmap.h : Aucun fichier ou dossier de ce type
triangle.cpp:5:22: erreur: qpainter.h : Aucun fichier ou dossier de ce type
triangle.cpp:6:20: erreur: qlabel.h : Aucun fichier ou dossier de ce type
triangle.cpp:7:26: erreur: qapplication.h : Aucun fichier ou dossier de ce type
triangle.cpp:10: erreur: ‘QPixmap’ does not name a type
triangle.cpp: In function ‘int main(int, char**)’:
triangle.cpp:21: erreur: ‘QApplication’ was not declared in this scope
triangle.cpp:21: erreur: expected ‘;’ before ‘app’
triangle.cpp:23: erreur: ‘QWidget’ was not declared in this scope
triangle.cpp:23: erreur: ‘widget’ was not declared in this scope
triangle.cpp:23: erreur: expected type-specifier before ‘QWidget’
triangle.cpp:23: erreur: expected ‘;’ before ‘QWidget’
triangle.cpp:25: erreur: ‘QLabel’ was not declared in this scope
triangle.cpp:25: erreur: expected ‘;’ before ‘label’
triangle.cpp:26: erreur: ‘label’ was not declared in this scope
triangle.cpp:28: erreur: ‘class Geometrie’ has no member named ‘triangle’
triangle.cpp:29: erreur: ‘app’ was not declared in this scope
triangle.cpp: At global scope:
triangle.cpp:20: attention : unused parameter ‘argc’
triangle.cpp:20: attention : unused parameter ‘argv’
make: *** [triangle.o] Erreur 1
[cepamonpseudo@localhost courant]$ ls
courant.pro Makefile triangle.cpp
[cepamonpseudo@localhost courant]$ | |
Voici mon programme :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
//Trés grand triangle isocéle
#include <qstring.h>
#include <qcolor.h>
#include <qpixmap.h>
#include <qpainter.h>
#include <qlabel.h>
#include <qapplication.h>
class Geometrie
{ public :
QPixmap triangle()
{ QPixmap pixels(1330,730) ;
pixels.fill(QColor::QColor(255,255,255)) ;
QPainter pinceo(&pixels) ;
pinceo.drawLine(665,10,10,665) ;
pinceo.drawLine(10,665,1320,665) ;
pinceo.drawLine(1320,665,665,10) ;
return pixels ;
}
};
int main(int argc,char ** argv)
{ QApplication app(argc,argv) ;
Geometrie obj ;
QWidget * widget = new QWidget ;
widget->setFixedSize(1430,830) ;
QLabel label (widget,"une image") ;
label.setFixedSize(1330,730) ;
label.move(50,50) ;
label.setPixmap(obj.triangle()) ;
app.setMainWidget(widget) ;
widget->show() ;
app.exec() ;
return 0 ;
} |
Voici ma question :
Où dois-je utilser le export , pour changer le path librairie /usr/lib/qt4/include en /usr/lib/qt3/include ?
( ] $ export ??? =/usr/lib/qt3/include )