天嵌 ARM开发社区

 找回密码
 注册
查看: 3198|回复: 9

first移植make时报错,求救

[复制链接]
Higig 发表于 2009-7-20 15:35:22 | 显示全部楼层 |阅读模式
first移植TQ2440,在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]#


提示好像是说main.o的格式不对,但是我是从前面拷贝过来的呀,前面那个是可以在PC上面模拟运行的呀。Makefile文件仔细和手册核对了好几遍,请斑竹帮我看看,谢谢了。
 楼主| Higig 发表于 2009-7-20 15:36:51 | 显示全部楼层
上面的错误码发错,不好意思。

first移植TQ2440,在make的时候出现错误,错误代码如下:


[root@EmbedSky first]# make
arm-linux-g++  -o /opt/EmbedSky/Qte/touch_qtopia/qtopia/bin/first main.o first.o moc_first.o  -L/opt/EmbedSky/Qte/touch_qtopia/qtopia/lib -L/opt/EmbedSky/Qte/touch_qtopia/qt/lib -L/opt/EmbedSky/crosstools_3.4.5_softfloat/gcc-3.4.5-glibc-2.3.6/arm-linux/  -lqpe -lqtopia -lqte
/opt/EmbedSky/crosstools_3.4.5_softfloat/gcc-3.4.5-glibc-2.3.6/arm-linux/lib/gcc/arm-linux/3.4.5/../../../../arm-linux/bin/ld: main.o: Relocations in generic ELF (EM: 3)
main.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [/opt/EmbedSky/Qte/touch_qtopia/qtopia/bin/first] Error 1
[root@EmbedSky first]#


提示好像是说main.o的格式不对,但是我是从前面拷贝过来的呀,前面那个是可以在PC上面模拟运行的呀。Makefile文件仔细和手册核对了好几遍,请斑竹帮我看看,谢谢了。
 楼主| Higig 发表于 2009-7-20 16:54:47 | 显示全部楼层
make clean就可以解决以上问题了。
但是为什么把把那三个文件拷贝到文件系统,并制作yaffs文件,下载到开发板,确没有什么反应呢?还是显示的开机画面啊??
亚瑟王 发表于 2009-7-23 10:24:35 | 显示全部楼层
你需要进入到Qt界面里面(校正通过了就能看到了),很好,把解决的方法贴出来了,不错的。
fanciedboy 发表于 2009-7-31 11:05:14 | 显示全部楼层
:lol我也同样问题,见此贴make clean一下,试用,果然见效,pass -------------happy
 楼主| Higig 发表于 2009-8-19 09:22:17 | 显示全部楼层
可是他根本不出现校正的画面呀,上次出现过的,后来怎么也不出现了哦。

重新做了,下载下去也不出现校正的画面了,这是怎么回事啊?我把光盘上root_nfs做成yaffs文件下载下去也不行啊?请解答。
亚瑟王 发表于 2009-8-22 10:43:01 | 显示全部楼层
你用的什么版本的交叉编译器?
huanxin1456 发表于 2009-10-31 14:27:56 | 显示全部楼层
我觉得是makefile文件有问题,你贴出来看看你的makefile,,
xuehui869 发表于 2009-11-1 13:33:04 | 显示全部楼层
我的 first也没编译通过
亚瑟王 发表于 2009-11-12 16:51:18 | 显示全部楼层
出什么错误?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

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

GMT+8, 2024-4-30 04:31 , Processed in 1.062507 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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