zdravim!
chcem sa zacat zaoberat s Qt, ale este sa mi nepodarilo skompilovat ani helloworld. Qt mam nainstalovane z download.zenwalk.org.
zdrojak:
#include
#include
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();
}
kompilovanie:
peto[qt]$ qmake -project
peto[qt]$ qmake
peto[qt]$ make
g++ -o qt main.o -L/usr/X11R6/lib -lXext -lX11 -lm
main.o(.text+0x1f): In function `main':
: undefined reference to `QApplication::QApplication(int&, char**)'
main.o(.text+0x32): In function `main':
: undefined reference to `QString::QString(char const*)'
main.o(.text+0x46): In function `main':
: undefined reference to `QPushButton::QPushButton(QString const&, QWidget*, char const*)'
main.o(.text+0x5e): In function `main':
: undefined reference to `QString::shared_null'
main.o(.text+0x69): In function `main':
: undefined reference to `QStringData::deleteSelf()'
main.o(.text+0x77): In function `main':
: undefined reference to `QPushButton::resize(int, int)'
main.o(.text+0x80): In function `main':
: undefined reference to `QApplication::setMainWidget(QWidget*)'
main.o(.text+0x88): In function `main':
: undefined reference to `QWidget::show()'
main.o(.text+0x90): In function `main':
: undefined reference to `QApplication::exec()'
main.o(.text+0x9b): In function `main':
: undefined reference to `QPushButton::~QPushButton()'
main.o(.text+0xa3): In function `main':
: undefined reference to `QApplication::~QApplication()'
main.o(.text+0xd3): In function `main':
: undefined reference to `QString::shared_null'
main.o(.text+0xde): In function `main':
: undefined reference to `QStringData::deleteSelf()'
main.o(.text+0xf7): In function `main':
: undefined reference to `QApplication::~QApplication()'
main.o(.text+0x117): In function `main':
: undefined reference to `QPushButton::~QPushButton()'
main.o(.gnu.linkonce.r._ZTV6QGList+0xc): undefined reference to `QGList::clear()'
main.o(.gnu.linkonce.r._ZTV6QGList+0x10): undefined reference to `QGList::~QGList()'
main.o(.gnu.linkonce.r._ZTV6QGList+0x14): undefined reference to `QGList::~QGList()'
main.o(.gnu.linkonce.r._ZTV6QGList+0x18): undefined reference to `QPtrCollection::newItem(void*)'
main.o(.gnu.linkonce.r._ZTV6QGList+0x20): undefined reference to `QGList::compareItems(void*, void*)'
main.o(.gnu.linkonce.r._ZTV6QGList+0x24): undefined reference to `QGList::read(QDataStream&, void*&)'
main.o(.gnu.linkonce.r._ZTV6QGList+0x28): undefined reference to `QGList::write(QDataStream&, void*) const'
main.o(.gnu.linkonce.r._ZTI6QGList+0x8): undefined reference to `typeinfo for QPtrCollection'
collect2: ld returned 1 exit status
make: *** [qt] Error 1
viete poradit co treba?
kito
Everything is proceeding as I have foreseen.