Trolltech Home | Qtopia-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qtopia-interest Archive, October 2006
example compilation problem in Qtopia


Message 1 in thread

Hi All,
I installed qtopia-free-sdk-2.2.0-1 in my SUSE 10.
designer  command i opened and created some sample file by following
qtdesigner manual.
But it is giving following error message.

uic -o PizzaEntry.h pizza.ui
uic -i PizzaEntry.h -o PizzaEntry.cpp pizza.ui
Then I created a .cpp file as specified in the Qtdesigner tutorial.
After that i did

moc -o moc_PizzaEntry.cpp PizzaEntry.h
Then i used
qmake -project  //which will create .pro file
Then i used
tmake  qtdesigner.pro -o Makefile
make
The errors are as follows

g++ -c -pipe -Wall -W -O2 -DNO_DEBUG -I. -I/opt/Qtopia_Sdk/include -o
TestdesignerTest.o TestdesignerTest.cpp
g++ -c -pipe -Wall -W -O2 -DNO_DEBUG -I. -I/opt/Qtopia_Sdk/include -o
Testdesigner.o Testdesigner.cpp
/opt/Qtopia_Sdk/include/qtooltip.h:87: warning: 'class QToolTip' has virtual
functions but non-virtual destructor
g++ -c -pipe -Wall -W -O2 -DNO_DEBUG -I. -I/opt/Qtopia_Sdk/include -o
moc_Testdesigner.o moc_Testdesigner.cpp
g++  -o QTDesigner TestdesignerTest.o Testdesigner.o moc_Testdesigner.o
-L/opt/Qtopia_Sdk/lib -L/usr/X11R6/lib -lqt -lXext -lX11 -lm
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/bin/ld:
warning: libstdc++.so.5, needed by /opt/Qtopia_Sdk/lib/libqt.so, may
conflict with libstdc++.so.6
moc_Testdesigner.o: In function `MainForm::staticMetaObject()':
moc_Testdesigner.cpp:(.text+0x9c): undefined reference to
`QMetaObject::new_metaobject(char const*, char const*, QMetaData*, int,
QMetaData*, int, QClassInfo*, int)'
collect2: ld returned 1 exit status
make: *** [QTDesigner] Error 1

If I use
g++ -I$QTDIR/include PizzaEntry.cpp PizzaEntryTest.cpp  command
it is giving lot of errors like

tmp/cc6qy7E1.o: In function `MainForm::MainForm(QWidget*, char const*, bool,
unsigned int)':
Testdesigner.cpp:(.text+0x2a): undefined reference to
`QDialog::QDialog(QWidget*, char const*, bool, unsigned int)'
Testdesigner.cpp:(.text+0x32): undefined reference to `vtable for MainForm'
Testdesigner.cpp:(.text+0x3c): undefined reference to `vtable for MainForm'
Testdesigner.cpp:(.text+0x59): undefined reference to `QWidget::setName(char
const*)'
Testdesigner.cpp:(.text+0x6a): undefined reference to
`QWidget::setEnabled(bool)'
Testdesigner.cpp:(.text+0x83): undefined reference to `QDialog::resize(int,
int)'
Testdesigner.cpp:(.text+0x96): undefined reference to `QWidget::sizePolicy()
const'
Testdesigner.cpp:(.text+0xd9): undefined reference to
`QWidget::setSizePolicy(QSizePolicy)'
Testdesigner.cpp:(.text+0xed): undefined reference to `MainForm::tr(char
const*)'
Testdesigner.cpp:(.text+0x100): undefined reference to
`QWidget::setCaption(QString const&)'
Testdesigner.cpp:(.text+0x167): undefined reference to
`QButtonGroup::QButtonGroup(QWidget*, char const*)'
Testdesigner.cpp:(.text+0x210): undefined reference to `MainForm::tr(char
const*)'
Testdesigner.cpp:(.text+0x299): undefined reference to
`QCheckBox::QCheckBox(QWidget*, char const*)'
Testdesigner.cpp:(.text+0x33f): undefined reference to `MainForm::tr(char
const*)'
Testdesigner.cpp:(.text+0x3c8): undefined reference to
`QCheckBox::QCheckBox(QWidget*, char const*)'
Testdesigner.cpp:(.text+0x46e): undefined reference to `MainForm::tr(char
const*)'
Testdesigner.cpp:(.text+0x4f1): undefined reference to
`QPushButton::QPushButton(QWidget*, char const*)'
Testdesigner.cpp:(.text+0x598): undefined reference to `MainForm::tr(char
const*)'
Testdesigner.cpp:(.text+0x61b): undefined reference to
`QPushButton::QPushButton(QWidget*, char const*)'
Testdesigner.cpp:(.text+0x6bf): undefined reference to `MainForm::tr(char
const*)'
Testdesigner.cpp:(.text+0x727): undefined reference to `QDialog::~QDialog()'
/tmp/cc6qy7E1.o: In function `MainForm::MainForm(QWidget*, char const*,
bool, unsigned int)':
Testdesigner.cpp:(.text+0x772): undefined reference to
`QDialog::QDialog(QWidget*, char const*, bool, unsigned int)'
Testdesigner.cpp:(.text+0x77a): undefined reference to `vtable for MainForm'
Testdesigner.cpp:(.text+0x784): undefined reference to `vtable for MainForm'
Testdesigner.cpp:(.text+0x7a1): undefined reference to
`QWidget::setName(char const*)'
Testdesigner.cpp:(.text+0x7b2): undefined reference to
`QWidget::setEnabled(bool)'
Testdesigner.cpp:(.text+0x7cb): undefined reference to `QDialog::resize(int,
int)'
Testdesigner.cpp:(.text+0x7de): undefined reference to
`QWidget::sizePolicy() const'
Testdesigner.cpp:(.text+0x821): undefined reference to
`QWidget::setSizePolicy(QSizePolicy)'
Testdesigner.cpp:(.text+0x835): undefined reference to `MainForm::tr(char
const*)'
Testdesigner.cpp:(.text+0x848): undefined reference to
`QWidget::setCaption(QString const&)'
Testdesigner.cpp:(.text+0x8af): undefined reference to
`QButtonGroup::QButtonGroup(QWidget*, char const*)'
Testdesigner.cpp:(.text+0x958): undefined reference to `MainForm::tr(char
const*)'
Testdesigner.cpp:(.text+0x9e1): undefined reference to
`QCheckBox::QCheckBox(QWidget*, char const*)'
Testdesigner.cpp:(.text+0xa87): undefined reference to `MainForm::tr(char
const*)'
Testdesigner.cpp:(.text+0xb10): undefined reference to
`QCheckBox::QCheckBox(QWidget*, char const*)'
Testdesigner.cpp:(.text+0xbb6): undefined reference to `MainForm::tr(char
const*)'
Testdesigner.cpp:(.text+0xc39): undefined reference to
`QPushButton::QPushButton(QWidget*, char const*)'
Testdesigner.cpp:(.text+0xce0): undefined reference to `MainForm::tr(char
const*)'
Testdesigner.cpp:(.text+0xd63): undefined reference to
`QPushButton::QPushButton(QWidget*, char const*)'
Testdesigner.cpp:(.text+0xe07): undefined reference to `MainForm::tr(char
const*)'
Testdesigner.cpp:(.text+0xe6f): undefined reference to `QDialog::~QDialog()'
/tmp/cc6qy7E1.o: In function `MainForm::~MainForm()':
Testdesigner.cpp:(.text+0xe97): undefined reference to `vtable for MainForm'
Testdesigner.cpp:(.text+0xea1): undefined reference to `vtable for MainForm'
Testdesigner.cpp:(.text+0xeb3): undefined reference to `QDialog::~QDialog()'
/tmp/cc6qy7E1.o: In function `MainForm::~MainForm()':
Testdesigner.cpp:(.text+0xedb): undefined reference to `vtable for MainForm'
Testdesigner.cpp:(.text+0xee5): undefined reference to `vtable for MainForm'
Testdesigner.cpp:(.text+0xef7): undefined reference to `QDialog::~QDialog()'
/tmp/cc6qy7E1.o: In function `MainForm::~MainForm()':
Testdesigner.cpp:(.text+0xf1f): undefined reference to `vtable for MainForm'
Testdesigner.cpp:(.text+0xf29): undefined reference to `vtable for MainForm'
Testdesigner.cpp:(.text+0xf3b): undefined reference to `QDialog::~QDialog()'
/tmp/cc6qy7E1.o: In function `QString::~QString()':
Testdesigner.cpp:(.gnu.linkonce.t._ZN7QStringD1Ev[QString::~QString()]+0x21):
undefined reference to `QString::shared_null'
Testdesigner.cpp:(.gnu.linkonce.t._ZN7QStringD1Ev[QString::~QString()]+0x2b):
undefined reference to `QString::shared_null'
Testdesigner.cpp:(.gnu.linkonce.t._ZN7QStringD1Ev[QString::~QString()]+0x3d):
undefined reference to `QStringData::deleteSelf()'
/tmp/ccJOWEJU.o: In function `main':
TestdesignerTest.cpp:(.text+0x2f): undefined reference to
`QApplication::QApplication(int&, char**)'
TestdesignerTest.cpp:(.text+0x5f): undefined reference to
`QApplication::setMainWidget(QWidget*)'
TestdesignerTest.cpp:(.text+0x71): undefined reference to `QDialog::show()'
TestdesignerTest.cpp:(.text+0x80): undefined reference to
`QApplication::exec()'
TestdesignerTest.cpp:(.text+0xd5): undefined reference to
`QApplication::~QApplication()'
TestdesignerTest.cpp:(.text+0xfe): undefined reference to
`QApplication::~QApplication()'
collect2: ld returned 1 exit status

Kindly help me in this problem.

Thanks in advance.

Regards,
Harsha