(Courriels de diversion: <typo@gaussait-independante.com> <epandage@accoutumes-mourante.com> <maintiendriez@surgir-apostasier.com> <foncerai@delivreraient-usurper.com> <valoriserais@proprietaire-bafouilleuse.com> <consequente@depossession-depensieres.com> <estime@recoifferez-suspensive.com> <pleurais@blondissaient-betonnais.com> <amenuiseriez@protagoniste-enlaca.com> <massivement@diffracter-moralisee.com> )


Bonjour,

Comme j'ai un peu de temps à tuer, je regarde les interfaces graphiques 
sous X. Je suis complètement newbie dans ce genre de truc.
J'ai trouvé Qt sur ma bécane et un tutorial. Je voudrais compiler 
l'exemple suivant :

#include <qapplication.h>
#include <qpushbutton.h>
int main(int argc, char **argv)
{
  QApplication a(argc,argv);
  QPushButtion hello("Hello world !',0);
  hello.resize(100,30);
  a.setMainWidget(&hello);
  hello.show();
  return a.exe();
}

compilation  : gcc -o toto -I "/usr/lib/qt3/include/" main.cc

erreurs récupérées :
/tmp/ccMVSzrk.o(.text+0x23): In function `main':
: undefined reference to `QApplication::QApplication[in-charge](int&, 
char**)'
/tmp/ccMVSzrk.o(.text+0x3b): In function `main':
: undefined reference to `QString::QString[in-charge](char const*)'
/tmp/ccMVSzrk.o(.text+0x51): In function `main':
: undefined reference to `QPushButton::QPushButton[in-charge](QString 
const&, QWidget*, char const*)'
/tmp/ccMVSzrk.o(.text+0xa4): In function `main':
: undefined reference to `QPushButton::resize(int, int)'
/tmp/ccMVSzrk.o(.text+0xba): In function `main':
: undefined reference to `QApplication::setMainWidget(QWidget*)'
/tmp/ccMVSzrk.o(.text+0xcc): In function `main':
: undefined reference to `QWidget::show()'
/tmp/ccMVSzrk.o(.text+0xdb): In function `main':
: undefined reference to `QApplication::exec()'
/tmp/ccMVSzrk.o(.text+0xf3): In function `main':
: undefined reference to `QPushButton::~QPushButton [in-charge]()'
/tmp/ccMVSzrk.o(.text+0x102): In function `main':
: undefined reference to `QApplication::~QApplication [in-charge]()'
/tmp/ccMVSzrk.o(.text+0x12e): In function `main':
: undefined reference to `QPushButton::~QPushButton [in-charge]()'
/tmp/ccMVSzrk.o(.text+0x151): In function `main':
: undefined reference to `QApplication::~QApplication [in-charge]()'
/tmp/ccMVSzrk.o(.gnu.linkonce.t._ZN7QStringD1Ev+0x21): In function 
`QString::~QString [in-charge]()':
: undefined reference to `QString::shared_null'
/tmp/ccMVSzrk.o(.gnu.linkonce.t._ZN7QStringD1Ev+0x30): In function 
`QString::~QString [in-charge]()':
: undefined reference to `QStringData::deleteSelf()'
/tmp/ccMVSzrk.o(.eh_frame+0x12): undefined reference to 
`__gxx_personality_v0'
collect2: ld returned 1 exit status

C'est pas très bo, mais a priori il ne me manque qu'un petit truc. Lequel ?

Merci,

François


--------------------------------------------------------------------
Les listes de diffusion occultes: <URL:http://www.CULTe.org/listes/>