大家好,本人是个初学者,用的是qt-x11-2.3.2,安装的到是没问题.但我自己编了一个简单的GUI,在通过makefile生成能在framebuffer上运行的程序时, make后总是报如下错误.我做实验台附带的实验时都能make成功的(那里源文件和makefile文件他都给好了).由于本人对moc和*.o
还都不太了结,所以恳请各位大虾帮我看看我到底是源程序有问题还是makefile有问题,最好别让我换QT4,目前我还想在这个版本下搞定
#以下是make后屏幕显示#
/usr/lib/qt-3.1/bin/uic Form1.ui -o ./Form1.h
/usr/lib/qt-3.1/bin/uic Form1.ui -i Form1.h -o Form1.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -D
NO_DEBUG -I/usr/lib/qt-3.1/include -o Form1.o Form1.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -D
NO_DEBUG -I/usr/lib/qt-3.1/include -o main.o main.cpp
/usr/lib/qt-3.1/bin/moc Form1.h -o moc_Form1.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -D
NO_DEBUG -I/usr/lib/qt-3.1/include -o moc_Form1.o moc_Form1.cpp
g++ -o Form1 Form1.o main.o Form1.o moc_Form1.o moc_Form1.o -L/usr/lib/qt-3.1/
lib -lm -lqte -lstdc++
Form1.o(.text+0x0): In function `Form1::Form1[not-in-charge](QWidget*, char cons
t*, unsigned)':
: multiple definition of `Form1::Form1[not-in-charge](QWidget*, char const*, uns
igned)'
Form1.o(.text+0x0): first defined here
Form1.o(.text+0x374): In function `Form1::languageChange()':
: multiple definition of `Form1::languageChange()'
Form1.o(.text+0x374): first defined here
Form1.o(.text+0x180): In function `Form1::Form1[in-charge](QWidget*, char const*
, unsigned)':
: multiple definition of `Form1::Form1[in-charge](QWidget*, char const*, unsigne
d)'
Form1.o(.text+0x180): first defined here
Form1.o(.text+0x300): In function `Form1::~Form1 [not-in-charge]()':
: multiple definition of `Form1::~Form1 [not-in-charge]()'
Form1.o(.text+0x300): first defined here
Form1.o(.text+0x324): In function `Form1::~Form1 [in-charge]()':
: multiple definition of `Form1::~Form1 [in-charge]()'
Form1.o(.text+0x324): first defined here
Form1.o(.text+0x348): In function `Form1::~Form1 [in-charge deleting]()':
: multiple definition of `Form1::~Form1 [in-charge deleting]()'
Form1.o(.text+0x348): first defined here
moc_Form1.o(.text+0x8c): In function `Form1::staticMetaObject()':
: multiple definition of `Form1::staticMetaObject()'
moc_Form1.o(.text+0x8c): first defined here
moc_Form1.o(.text+0x0): In function `Form1::className() const':
: multiple definition of `Form1::className() const'
moc_Form1.o(.text+0x0): first defined here
moc_Form1.o(.data+0x0): multiple definition of `Form1::metaObj'
moc_Form1.o(.data+0x0): first defined here
moc_Form1.o(.text+0xc): In function `Form1::tr(char const*, char const*)':
: multiple definition of `Form1::tr(char const*, char const*)'
moc_Form1.o(.text+0xc): first defined here
moc_Form1.o(.text+0x4c): In function `Form1::trUtf8(char const*, char const*)':
: multiple definition of `Form1::trUtf8(char const*, char const*)'
moc_Form1.o(.text+0x4c): first defined here
moc_Form1.o(.text+0xe8): In function `Form1::qt_cast(char const*)':
: multiple definition of `Form1::qt_cast(char const*)'
moc_Form1.o(.text+0xe8): first defined here
moc_Form1.o(.text+0x144): In function `Form1::qt_invoke(int, QUObject*)':
: multiple definition of `Form1::qt_invoke(int, QUObject*)'
moc_Form1.o(.text+0x144): first defined here
moc_Form1.o(.text+0x188): In function `Form1::qt_emit(int, QUObject*)':
: multiple definition of `Form1::qt_emit(int, QUObject*)'
moc_Form1.o(.text+0x188): first defined here
moc_Form1.o(.text+0x1a4): In function `Form1::qt_property(int, int, QVariant*)':
: multiple definition of `Form1::qt_property(int, int, QVariant*)'
moc_Form1.o(.text+0x1a4): first defined here
moc_Form1.o(.text+0x1c0): In function `Form1::qt_static_property(QObject*, int,
int, QVariant*)':
: multiple definition of `Form1::qt_static_property(QObject*, int, int, QVariant
*)'
moc_Form1.o(.text+0x1c0): first defined here
/usr/bin/ld: cannot find -lqte
collect2: ld returned 1 exit status
make: *** [Form1] Error 1