|
在进行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
|
|