Qt Tutorial

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I can't get the Qt example "Hello world" to link and I don't know why?

I clipped the program from the tutorial in the RH8 distribution:

Then as instructed issued from Xterm commands:
qmake -project
qmake
make

It looks like I'm compiling but not linking with the follow error:

[robo1@robo1 qt]$ make
g++ -c -pipe -Wall -W -I/usr/include/fontconfig -I/usr/include/Xft2 -O2 -march=i
386 -mcpu=i686 -fno-use-cxa-atexit -fno-exceptions -DQT_NO_DEBUG  -I/usr/lib/qt3
-gcc3.2/include -I/usr/lib/qt3-gcc3.2/mkspecs/default -o main.o main.cpp
g++  -o qt main.o    -L/usr/X11R6/lib -lXext -lX11 -lm
main.o: In function `main':
main.o(.text+0x30): undefined reference to `QApplication::QApplication[in-charge
](int&, char**)'
main.o(.text+0x40): undefined reference to `QString::QString[in-charge](char con
st*)'
main.o(.text+0x5c): undefined reference to `QPushButton::QPushButton[in-charge](
QString const&, QWidget*, char const*)'
main.o(.text+0x77): undefined reference to `QString::shared_null'
main.o(.text+0x81): undefined reference to `QStringData::deleteSelf()'
main.o(.text+0x99): undefined reference to `QPushButton::resize(int, int)'
main.o(.text+0xa5): undefined reference to `QApplication::setMainWidget(QWidget*
)'
main.o(.text+0xad): undefined reference to `QWidget::show()'
main.o(.text+0xb5): undefined reference to `QApplication::exec()'
main.o(.text+0xbf): undefined reference to `QPushButton::~QPushButton [in-charge
]()'
main.o(.text+0xc7): undefined reference to `QApplication::~QApplication [in-char
ge]()'
main.o(.text+0xd9): undefined reference to `QString::shared_null'
collect2: ld returned 1 exit status
make: *** [qt] Error 1

Any guidance would be appreciated.  Thanks




--
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux