天嵌 First Qt program 问题解决

废话不多说,开门见山

问题一:

Makefile:133: warning: overriding commands for target `moc_first.cpp'
Makefile:130: 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
g++  -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+0x344): In function `first::first[in-charge](QWidget*, char const*, unsigned)':
: multiple definition of `first::first[in-charge](QWidget*, char const*, unsigned)'
first.o(.text+0x344): first defined here
first.o(.text+0x688): In function `first::~first [not-in-charge]()':
: multiple definition of `first::~first [not-in-charge]()'
first.o(.text+0x688): first defined here
first.o(.text+0x6ac): In function `first::~first [in-charge]()':
: multiple definition of `first::~first [in-charge]()'
first.o(.text+0x6ac): first defined here
first.o(.text+0x6d0): In function `first::~first [in-charge deleting]()':
: multiple definition of `first::~first [in-charge deleting]()'
first.o(.text+0x6d0): first defined here
first.o(.text+0x6fc): In function `first::event(QEvent*)':
: multiple definition of `first::event(QEvent*)'
first.o(.text+0x6fc): first defined here
first.o(.text+0x778): In function `first::user_button()':
: multiple definition of `first::user_button()'
first.o(.text+0x778): 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

 

解决:原来错误在于Makefile,里面重复编译了同样的文件:

         如:moc_first.o: moc_first.cpp /

                                                 first.h

         竟然编译了两次,重复写了两次。

 

问题二:

erro while loading shared libraries: libqpe.so.1: cannot open shared object file: No
such file or directory

解决:

在网上找到的解决方法是:

沒有設LD_LIBRARY_PATH…所以找不到lib
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$QPEDIR/lib:$LD_LIBRARY_PATH

根据这个修改,问题解决

I am a new ARMER, so I do want to record the problem whenever I come across.

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值