[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

QT Problem



Hejsa 

Jeg er lige gået igang med QT, da jeg skal lave nogle programmer der skal køre 
med GUI og KDeveloper ser ok ud, men så skal man jo lige lære det dersens QT 
lib at kende.
Jeg har prøvet deres standard tutorial eksempel 1 som ser således ud:

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

Jeg har kørt "qmake -project && qmake" for at lave en Makefile og så make for 
at kompilere, men make kommer med dette som jeg ikke lige kan find ud af at 
fikse - er der nogen der ved hvorfor QT kommer med "undefined refrence"?

Her er make outputtet

g++  -o qt main.o   -L/usr/X11R6/lib -lXext -lX11 -lm
main.o: In function `main':
main.o(.text+0x21): undefined reference to `QApplication::QApplication(int &, 
char **)'
main.o(.text+0x2e): undefined reference to `QString::QString(char const *)'
main.o(.text+0x42): undefined reference to `QPushButton::QPushButton(QString 
const &, QWidget *, char const *)'
main.o(.text+0x5a): undefined reference to `QString::shared_null'
main.o(.text+0x64): undefined reference to `QString::shared_null'
main.o(.text+0x6d): undefined reference to `QStringData::deleteSelf(void)'
main.o(.text+0x83): undefined reference to `QPushButton::resize(int, int)'
main.o(.text+0x8f): undefined reference to 
`QApplication::setMainWidget(QWidget *)'
main.o(.text+0x97): undefined reference to `QWidget::show(void)'
main.o(.text+0x9f): undefined reference to `QApplication::exec(void)'
main.o(.text+0xac): undefined reference to `QPushButton::~QPushButton(void)'
main.o(.text+0xb6): undefined reference to `QApplication::~QApplication(void)'
collect2: ld returned 1 exit status
make: *** [qt] Error 1

-- 
Bjarke Bruun - E-mail: sslug@sslug 
   __   _
  / /  (_)__  __ ____  __
 / /__/ / _ \/ // /\ \/ /  . . .  t h e   c h o i c e   o f   a
/____/_/_//_/\_,_/ /_/\_\              G N U   g e n e r a t i o n . . .



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *