天嵌 ARM开发社区

 找回密码
 注册
查看: 2263|回复: 0

QT应用程序开发第三章:最后一步编译(make)遇到的问题

[复制链接]
wangshenbo 发表于 2013-1-30 18:27:02 | 显示全部楼层 |阅读模式
在进行QT应用程序开发第三章时,我按书上一步一步来,但是在最后一步编译却出现差错,出现的错误如下,后来我进入beep的程序(直接解压EmbedSky_apps.tar.bz2得到的)然后直接make编译,发现出现同样的错误,这是什么原因,哪位大神知道,小弟不胜感激!
[root@localhost first]# make
Makefile:125: warning: overriding commands for target `moc_Mypro_first.cpp'
Makefile:122: warning: ignoring old commands for target `moc_Mypro_first.cpp'
cp -f  Mypro_first.desktop  /opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/image/opt/Qtopia/apps/EmbedSky/Mypro_first.desktop
cp -f  Mypro_first.png  /opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/image/opt/Qtopia/pics/Mypro_first.png
[root@localhost first]# make
Makefile:125: warning: overriding commands for target `moc_Mypro_first.cpp'
Makefile:122: warning: ignoring old commands for target `moc_Mypro_first.cpp'
g++  -o /opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/image/opt/Qtopia/bin/Mypro_first Mypro_first.o main.o Mypro_first.o moc_Mypro_first.o moc_Mypro_first.o  -L/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/lib -L/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qt2/lib -lqpe -lqtopia -lqte
Mypro_first.o: In function `Mypro_first::~Mypro_first()':
Mypro_first.cpp:(.text+0x0): multiple definition of `Mypro_first::~Mypro_first()'
Mypro_first.o:Mypro_first.cpp:(.text+0x0): first defined here
Mypro_first.o: In function `Mypro_first::~Mypro_first()':
Mypro_first.cpp:(.text+0x30): multiple definition of `Mypro_first::~Mypro_first()'
Mypro_first.o:Mypro_first.cpp:(.text+0x30): first defined here
Mypro_first.o: In function `Mypro_first::~Mypro_first()':
Mypro_first.cpp:(.text+0x50): multiple definition of `Mypro_first::~Mypro_first()'
Mypro_first.o:Mypro_first.cpp:(.text+0x50): first defined here
Mypro_first.o: In function `Mypro_first::event(QEvent*)':
Mypro_first.cpp:(.text+0x70): multiple definition of `Mypro_first::event(QEvent*)'
Mypro_first.o:Mypro_first.cpp:(.text+0x70): first defined here
Mypro_first.o: In function `Mypro_first::Mypro_first(QWidget*, char const*, unsigned int)':
Mypro_first.cpp:(.text+0x100): multiple definition of `Mypro_first::Mypro_first(QWidget*, char const*, unsigned int)'
Mypro_first.o:Mypro_first.cpp:(.text+0x100): first defined here
Mypro_first.o: In function `Mypro_first::User()':
Mypro_first.cpp:(.text+0x480): multiple definition of `Mypro_first::User()'
Mypro_first.o:Mypro_first.cpp:(.text+0x480): first defined here
Mypro_first.o: In function `Mypro_first::Mypro_first(QWidget*, char const*, unsigned int)':
Mypro_first.cpp:(.text+0x500): multiple definition of `Mypro_first::Mypro_first(QWidget*, char const*, unsigned int)'
Mypro_first.o:Mypro_first.cpp:(.text+0x500): first defined here
moc_Mypro_first.o: In function `Mypro_first::className() const':
moc_Mypro_first.cpp:(.text+0x0): multiple definition of `Mypro_first::className() const'
moc_Mypro_first.o:moc_Mypro_first.cpp:(.text+0x0): first defined here
moc_Mypro_first.o: In function `Mypro_first::staticMetaObject()':
moc_Mypro_first.cpp:(.text+0x90): multiple definition of `Mypro_first::staticMetaObject()'
moc_Mypro_first.o:moc_Mypro_first.cpp:(.text+0x90): first defined here
moc_Mypro_first.o:(.bss+0x0): multiple definition of `Mypro_first::metaObj'
moc_Mypro_first.o:(.bss+0x0): first defined here
moc_Mypro_first.o: In function `Mypro_first::tr(char const*, char const*)':
moc_Mypro_first.cpp:(.text+0x170): multiple definition of `Mypro_first::tr(char const*, char const*)'
moc_Mypro_first.o:moc_Mypro_first.cpp:(.text+0x170): first defined here
moc_Mypro_first.o: In function `Mypro_first::tr(char const*)':
moc_Mypro_first.cpp:(.text+0x1b0): multiple definition of `Mypro_first::tr(char const*)'
moc_Mypro_first.o:moc_Mypro_first.cpp:(.text+0x1b0): first defined here
moc_Mypro_first.o: In function `Mypro_first::initMetaObject()':
moc_Mypro_first.cpp:(.text+0x1f0): multiple definition of `Mypro_first::initMetaObject()'
moc_Mypro_first.o:moc_Mypro_first.cpp:(.text+0x1f0): first defined here
collect2: ld returned 1 exit status
make: *** [/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/image/opt/Qtopia/bin/Mypro_first] Error 1


您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号 )

GMT+8, 2024-4-25 12:04 , Processed in 1.046868 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表