QT中hello程序make出错
上一篇 /
下一篇 2009-01-07 20:06:26
/ 个人分类:Linux(含QT)
[root@jude jude_qt]# make
Makefile:119: warning: overriding commands for target `moc_hello.cpp'
Makefile:116: warning: ignoring old commands for target `moc_hello.cpp'
gcc -o hello hello.o main.o hello.o moc_hello.o moc_hello.o -L/usr/x-qtopia/qt-2.3.7/lib -lm -lqte
hello.o(.text+0x0): In function `Hello::Hello[not-in-charge](QWidget*, char const*, unsigned)':
: multiple definition of `Hello::Hello[not-in-charge](QWidget*, char const*, unsigned)'
hello.o(.text+0x0): first defined here
hello.o(.text+0x190): In function `Hello::Hello[in-charge](QWidget*, char const*, unsigned)':
: multiple definition of `Hello::Hello[in-charge](QWidget*, char const*, unsigned)'
hello.o(.text+0x190): first defined here
hello.o(.text+0x320): In function `Hello::~Hello [not-in-charge]()':
: multiple definition of `Hello::~Hello [not-in-charge]()'
hello.o(.text+0x320): first defined here
hello.o(.text+0x344): In function `Hello::~Hello [in-charge]()':
: multiple definition of `Hello::~Hello [in-charge]()'
hello.o(.text+0x344): first defined here
hello.o(.text+0x368): In function `Hello::~Hello [in-charge deleting]()':
: multiple definition of `Hello::~Hello [in-charge deleting]()'
hello.o(.text+0x368): first defined here
moc_hello.o(.text+0xcc): In function `Hello::staticMetaObject()':
: multiple definition of `Hello::staticMetaObject()'
moc_hello.o(.text+0xcc): first defined here
moc_hello.o(.text+0x0): In function `Hello::className() const':
: multiple definition of `Hello::className() const'
moc_hello.o(.text+0x0): first defined here
moc_hello.o(.data+0x0): multiple definition of `Hello::metaObj'
moc_hello.o(.data+0x0): first defined here
moc_hello.o(.text+0xc): In function `Hello::initMetaObject()':
: multiple definition of `Hello::initMetaObject()'
moc_hello.o(.text+0xc): first defined here
moc_hello.o(.text+0x74): In function `Hello::tr(char const*)':
: multiple definition of `Hello::tr(char const*)'
moc_hello.o(.text+0x74): first defined here
moc_hello.o(.text+0xa0): In function `Hello::tr(char const*, char const*)':
: multiple definition of `Hello::tr(char const*, char const*)'
moc_hello.o(.text+0xa0): first defined here
/usr/x-qtopia/qt-2.3.7/lib/libqte.so: undefined reference to `QWizard::staticMetaObject()'
collect2: ld returned 1 exit status
make: *** [hello] Error 1
解决方法:
.pro文件中的qt改为qtopia
收藏
举报
TAG: