天嵌 ARM开发社区

 找回密码
 注册
查看: 2103|回复: 2

first例程为什么make不了呀?求救!

[复制链接]
Higig 发表于 2009-7-20 14:06:25 | 显示全部楼层 |阅读模式
按照QT完全手册来的,最后make的时候报错,错误信息如下:



[root@EmbedSky first]# make
Makefile:132: warning: overriding commands for target `moc_first.cpp'
Makefile:129: 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/qt/include -I/opt/EmbedSky/Qte/x86_qtopia/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/qt/include -I/opt/EmbedSky/Qte/x86_qtopia/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/qt/include -I/opt/EmbedSky/Qte/x86_qtopia/qtopia/include -o moc_first.o moc_first.cpp
gcc  -o /opt/EmbedSky/Qte/x86_qtopia/qtopia/bin/first first.o main.o first.o moc_first.o moc_first.o  -L/opt/EmbedSky/Qte/x86_qtopia/qtopia/lib -L/opt/EmbedSky/Qte/x86_qtopia/qt/lib -lqpe -lqtopia -lqte
first.o(.text+0x0): In function `first::first[not-in-charge](QWidget*, char const*, unsigned)':
: multiple definition of `first::first[not-in-charge](QWidget*, char const*, unsigned)'
first.o(.text+0x0): first defined here
first.o(.text+0x478): In function `first::first[in-charge](QWidget*, char const*, unsigned)':
: multiple definition of `first::first[in-charge](QWidget*, char const*, unsigned)'
first.o(.text+0x478): first defined here
first.o(.text+0x8f0): In function `first::~first [not-in-charge]()':
: multiple definition of `first::~first [not-in-charge]()'
first.o(.text+0x8f0): first defined here
first.o(.text+0x914): In function `first::~first [in-charge]()':
: multiple definition of `first::~first [in-charge]()'
first.o(.text+0x914): first defined here
first.o(.text+0x938): In function `first::~first [in-charge deleting]()':
: multiple definition of `first::~first [in-charge deleting]()'
first.o(.text+0x938): first defined here
first.o(.text+0x964): In function `first::event(QEvent*)':
: multiple definition of `first::event(QEvent*)'
first.o(.text+0x964): first defined here
first.o(.text+0xabc): In function `first::user_button()':
: multiple definition of `first::user_button()'
first.o(.text+0xabc): first defined here
moc_first.o(.text+0x0): In function `first::className() const':
: multiple definition of `first::className() const'
moc_first.o(.text+0x0): first defined here
moc_first.o(.data+0x0): multiple definition of `first::metaObj'
moc_first.o(.data+0x0): first defined here
moc_first.o(.text+0xc): In function `first::initMetaObject()':
: multiple definition of `first::initMetaObject()'
moc_first.o(.text+0xc): first defined here
moc_first.o(.text+0xcc): In function `first::staticMetaObject()':
: multiple definition of `first::staticMetaObject()'
moc_first.o(.text+0xcc): first defined here
moc_first.o(.text+0x74): In function `first::tr(char const*)':
: multiple definition of `first::tr(char const*)'
moc_first.o(.text+0x74): first defined here
moc_first.o(.text+0xa0): In function `first::tr(char const*, char const*)':
: multiple definition of `first::tr(char const*, char const*)'
moc_first.o(.text+0xa0): first defined here
collect2: ld returned 1 exit status
make: *** [/opt/EmbedSky/Qte/x86_qtopia/qtopia/bin/first] Error 1
[root@EmbedSky first]#


看上面信息似乎是多重定义引起的,但是我也是按手册来的呀,怎么出现这种情况呢??求大侠帮我看看。非常感谢!
 楼主| Higig 发表于 2009-7-20 14:15:31 | 显示全部楼层
问题解决了。
本以为只要按照手册画红线的地方改就行了的,但是看了别人发的帖子,似乎除了画红线的,其余的内容也要一一对照看。

希望刚开始学习的朋友要注意,以免浪费很多宝贵的时间,也请天嵌的手册在以后的版本要注意提醒广大的客户,节约我们的宝贵时间。
亚瑟王 发表于 2009-7-23 10:23:21 | 显示全部楼层
恩,这个建议采纳,很多细节没有注意到。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

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

GMT+8, 2024-4-29 19:39 , Processed in 1.078118 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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