SiJianH 发表于 2012-8-9 16:56:30

关于第一个应用程序“first”不能make通过

本帖最后由 SiJianH 于 2012-8-10 15:00 编辑

出错信息如下:Makefile:124: warning: overriding commands for target `moc_first.cpp'Makefile:121: warning: ignoring old commands for target `moc_first.cpp'g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qt2/include -I/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/include -o first.o first.cppg++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qt2/include -I/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/include -o main.o main.cppg++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qt2/include -I/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/include -o moc_first.o moc_first.cppg++-o /opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/image/opt/Qtopia/bin/first first.o main.o first.o moc_first.o moc_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 -lqtefirst.o: In function `first::event(QEvent*)':first.cpp:(.text+0x0): multiple definition of `first::event(QEvent*)'first.o:first.cpp:(.text+0x0): first defined herefirst.o: In function `non-virtual thunk to first::~first()':first.cpp:(.text+0x90): multiple definition of `non-virtual thunk to first::~first()'first.o:first.cpp:(.text+0x90): first defined herefirst.o: In function `first::~first()':first.cpp:(.text+0xa0): multiple definition of `first::~first()'first.o:first.cpp:(.text+0xa0): first defined herefirst.o: In function `first::~first()':first.cpp:(.text+0xc0): multiple definition of `first::~first()'first.o:first.cpp:(.text+0xc0): first defined herefirst.o: In function `non-virtual thunk to first::~first()':first.cpp:(.text+0xe0): multiple definition of `non-virtual thunk to first::~first()'first.o:first.cpp:(.text+0xe0): first defined herefirst.o: In function `first::~first()':first.cpp:(.text+0xf0): multiple definition of `first::~first()'first.o:first.cpp:(.text+0xf0): first defined herefirst.o: In function `first::user_button()':first.cpp:(.text+0x120): multiple definition of `first::user_button()'first.o:first.cpp:(.text+0x120): first defined herefirst.o: In function `first::first(QWidget*, char const*, unsigned int)':first.cpp:(.text+0x1a0): multiple definition of `first::first(QWidget*, char const*, unsigned int)'first.o:first.cpp:(.text+0x1a0): first defined herefirst.o: In function `first::first(QWidget*, char const*, unsigned int)':first.cpp:(.text+0x590): multiple definition of `first::first(QWidget*, char const*, unsigned int)'first.o:first.cpp:(.text+0x590): first defined heremoc_first.o: In function `first::className() const':moc_first.cpp:(.text+0x0): multiple definition of `first::className() const'moc_first.o:moc_first.cpp:(.text+0x0): first defined heremoc_first.o: In function `first::staticMetaObject()':moc_first.cpp:(.text+0x40): multiple definition of `first::staticMetaObject()'moc_first.o:moc_first.cpp:(.text+0x40): first defined heremoc_first.o:(.bss+0x0): multiple definition of `first::metaObj'moc_first.o:(.bss+0x0): first defined heremoc_first.o: In function `first::tr(char const*, char const*)':moc_first.cpp:(.text+0x100): multiple definition of `first::tr(char const*, char const*)'moc_first.o:moc_first.cpp:(.text+0x100): first defined heremoc_first.o: In function `first::tr(char const*)':moc_first.cpp:(.text+0x140): multiple definition of `first::tr(char const*)'moc_first.o:moc_first.cpp:(.text+0x140): first defined heremoc_first.o: In function `first::initMetaObject()':moc_first.cpp:(.text+0x180): multiple definition of `first::initMetaObject()'moc_first.o:moc_first.cpp:(.text+0x180): first defined herecollect2: ld returned 1 exit statusmake: *** Error 1

SiJianH 发表于 2012-8-9 18:51:56

我知道了:Makefile:124: warning: overriding commands for target `moc_first.cpp'
               Makefile:121: warning: ignoring old commands for target `moc_first.cpp'
Makefile中124行和121行重复了。

SiJianH 发表于 2012-8-9 19:16:59

解决了,是Makefile上的问题,重复了。

SiJianH 发表于 2012-8-9 19:22:39


我知道了:Makefile:124: warning: overriding commands for target `moc_first.cpp'
               Makefile:121: warning: ignoring old commands for target `moc_first.cpp'
Makefile中124行和121行重复了。

解决了,是Makefile上的问题,重复了。
页: [1]
查看完整版本: 关于第一个应用程序“first”不能make通过