天嵌 ARM开发社区

 找回密码
 注册
查看: 2609|回复: 3

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

[复制链接]
SiJianH 发表于 2012-8-9 16:56:30 | 显示全部楼层 |阅读模式
10
本帖最后由 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.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 main.o main.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 moc_first.o moc_first.cpp
g++  -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 -lqte
first.o: In function `first::event(QEvent*)':
first.cpp:(.text+0x0): multiple definition of `first::event(QEvent*)'
first.o:first.cpp:(.text+0x0): first defined here
first.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 here
first.o: In function `first::~first()':
first.cpp:(.text+0xa0): multiple definition of `first::~first()'
first.o:first.cpp:(.text+0xa0): first defined here
first.o: In function `first::~first()':
first.cpp:(.text+0xc0): multiple definition of `first::~first()'
first.o:first.cpp:(.text+0xc0): first defined here
first.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 here
first.o: In function `first::~first()':
first.cpp:(.text+0xf0): multiple definition of `first::~first()'
first.o:first.cpp:(.text+0xf0): first defined here
first.o: In function `first::user_button()':
first.cpp:(.text+0x120): multiple definition of `first::user_button()'
first.o:first.cpp:(.text+0x120): first defined here
first.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 here
first.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 here
moc_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 here
moc_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 here
moc_first.o:(.bss+0x0): multiple definition of `first::metaObj'
moc_first.o:(.bss+0x0): first defined here
moc_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 here
moc_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 here
moc_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 here
collect2: ld returned 1 exit status
make: *** [/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/image/opt/Qtopia/bin/first] 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上的问题,重复了。
回复

使用道具 举报

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

本版积分规则

关闭

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

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

GMT+8, 2024-4-28 14:28 , Processed in 1.046875 second(s), 19 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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