主题 : 在Fedora9下编译自己的 qtopia 应用程序出错,请大家帮忙!! 复制链接 | 浏览器收藏 | 打印
走自己的路,让别人去说!
级别: 侠客
UID: 11808
精华: 0
发帖: 86
金钱: 450 两
威望: 90 点
综合积分: 172 分
注册时间: 2009-12-21
最后登录: 2014-04-10
楼主  发表于: 2010-01-18 17:41

 在Fedora9下编译自己的 qtopia 应用程序出错,请大家帮忙!!

大家好,我自己按照
http://www.aiothome.net/read.php?tid-2998.html
所讲的简洁方法,想实现像hello那样的简单的显示程序。在执行 # ./build 后,出现了如下错误,不知道大家有没有碰到类似的问题,请大家指教!

[root@tom first]# ./build
rm -f .obj/release-shared/moc_first.o
rm -f .moc/release-shared/moc_first.cpp
rm -f .ui/release-shared/first.cpp .ui/release-shared/first.h
rm -f .obj/release-shared/main.o .obj/release-shared/first.o
rm -f *~ core *.core
/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/bin/uic first.ui -o .ui/release-shared/first.h
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -Os  -DQTOPIA_DATA_LINKING -DQCONFIG=\"qconfig-qpe.h\" -DQTOPIA_TARGET=\"first\" -DQTOPIA_TRTARGET=\"first\" -DQT_NO_DEBUG -I/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/mkspecs/qws/linux-generic-g++ -I. -I. -I../../qtopia-2.2.0-FriendlyARM/qtopia/include -I../../qtopia-2.2.0-FriendlyARM/qt2/include -I.ui/release-shared/ -I. -I.moc/release-shared/ -o .obj/release-shared/main.o main.cpp
/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/bin/uic first.ui -i first.h -o .ui/release-shared/first.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -Os  -DQTOPIA_DATA_LINKING -DQCONFIG=\"qconfig-qpe.h\" -DQTOPIA_TARGET=\"first\" -DQTOPIA_TRTARGET=\"first\" -DQT_NO_DEBUG -I/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/mkspecs/qws/linux-generic-g++ -I. -I. -I../../qtopia-2.2.0-FriendlyARM/qtopia/include -I../../qtopia-2.2.0-FriendlyARM/qt2/include -I.ui/release-shared/ -I. -I.moc/release-shared/ -o .obj/release-shared/first.o .ui/release-shared/first.cpp
/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/bin/moc .ui/release-shared/first.h -o .moc/release-shared/moc_first.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -Os  -DQTOPIA_DATA_LINKING -DQCONFIG=\"qconfig-qpe.h\" -DQTOPIA_TARGET=\"first\" -DQTOPIA_TRTARGET=\"first\" -DQT_NO_DEBUG -I/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/mkspecs/qws/linux-generic-g++ -I. -I. -I../../qtopia-2.2.0-FriendlyARM/qtopia/include -I../../qtopia-2.2.0-FriendlyARM/qt2/include -I.ui/release-shared/ -I. -I.moc/release-shared/ -o .obj/release-shared/moc_first.o .moc/release-shared/moc_first.cpp
make: Circular all <- first dependency dropped.
g++  -o first .obj/release-shared/main.o .obj/release-shared/first.o .obj/release-shared/moc_first.o   -L/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/lib -L/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/lib -lqte
.obj/release-shared/main.o: In function `main':
main.cpp:(.text+0x116): undefined reference to `QPEApplication::QPEApplication(int&, char**, QApplication::Type)'
main.cpp:(.text+0x263): undefined reference to `QPEApplication::showMainDocumentWidget(QWidget*, bool)'
main.cpp:(.text+0x26f): undefined reference to `QPEApplication::showMainWidget(QWidget*, bool)'
main.cpp:(.text+0x27d): undefined reference to `QPEApplication::exec()'
main.cpp:(.text+0x2a9): undefined reference to `QPEApplication::~QPEApplication()'
collect2: ld returned 1 exit status
make: *** [first] Error 1
对知识的追求永无止境
走自己的路,让别人去说!
级别: 侠客
UID: 11808
精华: 0
发帖: 86
金钱: 450 两
威望: 90 点
综合积分: 172 分
注册时间: 2009-12-21
最后登录: 2014-04-10
1楼  发表于: 2010-01-18 19:37
请大家帮帮忙啊··
对知识的追求永无止境
Eddy Lau (Sun Boy)
级别: 圣骑士
UID: 11202
精华: 1
发帖: 364
金钱: 1885 两
威望: 380 点
综合积分: 748 分
注册时间: 2009-11-30
最后登录: 2010-04-12
2楼  发表于: 2010-01-19 13:13
引用第1楼381762390于2010-01-18 19:37发表的  :
请大家帮帮忙啊··


看看这个帖子便清楚了:

"打开Qtopia2.2应用程序开发的神秘面纱(x86+arm+源代码+多媒体影音解说)"

http://www.aiothome.net/read.php?tid-4399.html


小弟用的方法, 基本上已是最简单的了.

為什麼生世間上 此間許多哀與傷 為什麼爭鬥不絕 歡欣不永享 
問為何人存隔膜 顏面無真相 問那天可找得到 理想中的烏托幫 
走自己的路,让别人去说!
级别: 侠客
UID: 11808
精华: 0
发帖: 86
金钱: 450 两
威望: 90 点
综合积分: 172 分
注册时间: 2009-12-21
最后登录: 2014-04-10
3楼  发表于: 2010-01-19 16:03
谢谢您的讲解。确实受益良多。我用的的VM下的Fedoa 9,现在在X86下可以编译出界面!
  但是按下按钮后函数无相应!点击后在终端显示:Warning: Form1::showhello(): Not implemented yet!
我的.pro文件中是这样写的:

######################################################################
# Automatically generated by qmake (1.06c-Qtopia) Tue Jan 19 11:53:31 2010
######################################################################
CONFIG += qtopiaapp
CONFIG -= buildQuicklaunch
DESTDIR    = $(QPEDIR)/image/opt/Qtopia/bin

# Input

#HEADERS    = t2.h
#SOURCES    = t2.cpp

SOURCES+=main.cpp


INTERFACES  = t2.ui
TARGET      = t2

这样就可以编译成功!我怀疑是我没有添加上以下两句,
HEADERS    = t2.h
SOURCES    = t2.cpp
但是我加了后,就出现了什么 重复定义t1.h ,t2.cpp等的 错误,请您指教指教··看可能是什么错误啊  在下不胜感激··
对知识的追求永无止境
走自己的路,让别人去说!
级别: 侠客
UID: 11808
精华: 0
发帖: 86
金钱: 450 两
威望: 90 点
综合积分: 172 分
注册时间: 2009-12-21
最后登录: 2014-04-10
4楼  发表于: 2010-01-19 16:07
以下是我执行buid时的错误build是板子自带的hello下的build
[root@tom t2]# ./build
WARNING: Found potential symbol conflict of t2.cpp (t2.cpp) in SOURCES
WARNING: Found potential symbol conflict of t2.h (t2.h) in HEADERS
Makefile:177: warning: overriding commands for target `.obj/release-shared/t2.o'
Makefile:162: warning: ignoring old commands for target `.obj/release-shared/t2.o'
Makefile:183: warning: overriding commands for target `.obj/release-shared/moc_t2.o'
Makefile:180: warning: ignoring old commands for target `.obj/release-shared/moc_t2.o'
Makefile:189: warning: overriding commands for target `.moc/release-shared/moc_t2.cpp'
Makefile:186: warning: ignoring old commands for target `.moc/release-shared/moc_t2.cpp'
rm -f .obj/release-shared/moc_t2.o .obj/release-shared/moc_t2.o
rm -f .moc/release-shared/moc_t2.cpp .moc/release-shared/moc_t2.cpp
rm -f .ui/release-shared/t2.cpp .ui/release-shared/t2.h
rm -f .obj/release-shared/t2.o .obj/release-shared/main.o .obj/release-shared/t2.o
rm -f *~ core *.core
Makefile:177: warning: overriding commands for target `.obj/release-shared/t2.o'
Makefile:162: warning: ignoring old commands for target `.obj/release-shared/t2.o'
Makefile:183: warning: overriding commands for target `.obj/release-shared/moc_t2.o'
Makefile:180: warning: ignoring old commands for target `.obj/release-shared/moc_t2.o'
Makefile:189: warning: overriding commands for target `.moc/release-shared/moc_t2.cpp'
Makefile:186: warning: ignoring old commands for target `.moc/release-shared/moc_t2.cpp'
/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/bin/uic t2.ui -o .ui/release-shared/t2.h
/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/bin/uic t2.ui -i t2.h -o .ui/release-shared/t2.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -Os  -DQTOPIA_DATA_LINKING -DQCONFIG=\"qconfig-qpe.h\" -DQTOPIA_TARGET=\"t2\" -DQTOPIA_TRTARGET=\"t2\" -DQT_NO_DEBUG -I/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/mkspecs/qws/linux-generic-g++ -I. -I../qtopia-2.2.0-FriendlyARM/qtopia/include -I../qtopia-2.2.0-FriendlyARM/qt2/include -I.ui/release-shared/ -I.moc/release-shared/ -o .obj/release-shared/t2.o .ui/release-shared/t2.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -Os  -DQTOPIA_DATA_LINKING -DQCONFIG=\"qconfig-qpe.h\" -DQTOPIA_TARGET=\"t2\" -DQTOPIA_TRTARGET=\"t2\" -DQT_NO_DEBUG -I/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/mkspecs/qws/linux-generic-g++ -I. -I../qtopia-2.2.0-FriendlyARM/qtopia/include -I../qtopia-2.2.0-FriendlyARM/qt2/include -I.ui/release-shared/ -I.moc/release-shared/ -o .obj/release-shared/main.o main.cpp
/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/bin/moc .ui/release-shared/t2.h -o .moc/release-shared/moc_t2.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -Os  -DQTOPIA_DATA_LINKING -DQCONFIG=\"qconfig-qpe.h\" -DQTOPIA_TARGET=\"t2\" -DQTOPIA_TRTARGET=\"t2\" -DQT_NO_DEBUG -I/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/mkspecs/qws/linux-generic-g++ -I. -I../qtopia-2.2.0-FriendlyARM/qtopia/include -I../qtopia-2.2.0-FriendlyARM/qt2/include -I.ui/release-shared/ -I.moc/release-shared/ -o .obj/release-shared/moc_t2.o .moc/release-shared/moc_t2.cpp
test -d /opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/image/opt/Qtopia/bin/ || mkdir -p /opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/image/opt/Qtopia/bin/
g++  -o /opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/image/opt/Qtopia/bin/t2 .obj/release-shared/t2.o .obj/release-shared/main.o .obj/release-shared/t2.o .obj/release-shared/moc_t2.o .obj/release-shared/moc_t2.o   -lqtopia2 -lqtopia -lqpe -L/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/lib -L/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/lib -lqte
.obj/release-shared/t2.o: In function `Form1::showhello()':
t2.cpp:(.text+0x0): multiple definition of `Form1::showhello()'
.obj/release-shared/t2.o:t2.cpp:(.text+0x0): first defined here
.obj/release-shared/t2.o: In function `non-virtual thunk to Form1::~Form1()':
t2.cpp:(.text+0x10): multiple definition of `non-virtual thunk to Form1::~Form1()'
.obj/release-shared/t2.o:t2.cpp:(.text+0x10): first defined here
.obj/release-shared/t2.o: In function `Form1::~Form1()':
t2.cpp:(.text+0x18): multiple definition of `Form1::~Form1()'
.obj/release-shared/t2.o:t2.cpp:(.text+0x18): first defined here
.obj/release-shared/t2.o: In function `Form1::~Form1()':
t2.cpp:(.text+0x32): multiple definition of `Form1::~Form1()'
.obj/release-shared/t2.o:t2.cpp:(.text+0x32): first defined here
.obj/release-shared/t2.o: In function `non-virtual thunk to Form1::~Form1()':
t2.cpp:(.text+0x4b): multiple definition of `non-virtual thunk to Form1::~Form1()'
.obj/release-shared/t2.o:t2.cpp:(.text+0x4b): first defined here
.obj/release-shared/t2.o: In function `Form1::~Form1()':
t2.cpp:(.text+0x52): multiple definition of `Form1::~Form1()'
.obj/release-shared/t2.o:t2.cpp:(.text+0x52): first defined here
.obj/release-shared/t2.o: In function `Form1::Form1(QWidget*, char const*, unsigned int)':
t2.cpp:(.text+0x7e): multiple definition of `Form1::Form1(QWidget*, char const*, unsigned int)'
.obj/release-shared/t2.o:t2.cpp:(.text+0x7e): first defined here
.obj/release-shared/t2.o: In function `Form1::Form1(QWidget*, char const*, unsigned int)':
t2.cpp:(.text+0x21a): multiple definition of `Form1::Form1(QWidget*, char const*, unsigned int)'
.obj/release-shared/t2.o:t2.cpp:(.text+0x21a): first defined here
.obj/release-shared/moc_t2.o: In function `Form1::className() const':
moc_t2.cpp:(.text+0x0): multiple definition of `Form1::className() const'
.obj/release-shared/moc_t2.o:moc_t2.cpp:(.text+0x0): first defined here
.obj/release-shared/moc_t2.o: In function `Form1::staticMetaObject()':
moc_t2.cpp:(.text+0x2a): multiple definition of `Form1::staticMetaObject()'
.obj/release-shared/moc_t2.o:moc_t2.cpp:(.text+0x2a): first defined here
.obj/release-shared/moc_t2.o:(.bss+0x0): multiple definition of `Form1::metaObj'
.obj/release-shared/moc_t2.o:(.bss+0x0): first defined here
.obj/release-shared/moc_t2.o: In function `Form1::tr(char const*, char const*)':
moc_t2.cpp:(.text+0xaa): multiple definition of `Form1::tr(char const*, char const*)'
.obj/release-shared/moc_t2.o:moc_t2.cpp:(.text+0xaa): first defined here
.obj/release-shared/moc_t2.o: In function `Form1::tr(char const*)':
moc_t2.cpp:(.text+0xd4): multiple definition of `Form1::tr(char const*)'
.obj/release-shared/moc_t2.o:moc_t2.cpp:(.text+0xd4): first defined here
.obj/release-shared/moc_t2.o: In function `Form1::initMetaObject()':
moc_t2.cpp:(.text+0xfe): multiple definition of `Form1::initMetaObject()'
.obj/release-shared/moc_t2.o:moc_t2.cpp:(.text+0xfe): first defined here
collect2: ld returned 1 exit status
make: *** [/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/image/opt/Qtopia/bin/t2] Error 1
对知识的追求永无止境
Eddy Lau (Sun Boy)
级别: 圣骑士
UID: 11202
精华: 1
发帖: 364
金钱: 1885 两
威望: 380 点
综合积分: 748 分
注册时间: 2009-11-30
最后登录: 2010-04-12
5楼  发表于: 2010-01-19 16:16
引用第3楼381762390于2010-01-19 16:03发表的  :
谢谢您的讲解。确实受益良多。我用的的VM下的Fedoa 9,现在在X86下可以编译出界面!
  但是按下按钮后函数无相应!点击后在终端显示:Warning: Form1::showhello(): Not implemented yet!
我的.pro文件中是这样写的:

######################################################################
.......


如果兄台能把所有代码打包上来的话, 小弟或许能帮你看看.

否则请恕在下爱莫能助了.

為什麼生世間上 此間許多哀與傷 為什麼爭鬥不絕 歡欣不永享 
問為何人存隔膜 顏面無真相 問那天可找得到 理想中的烏托幫 
走自己的路,让别人去说!
级别: 侠客
UID: 11808
精华: 0
发帖: 86
金钱: 450 两
威望: 90 点
综合积分: 172 分
注册时间: 2009-12-21
最后登录: 2014-04-10
6楼  发表于: 2010-01-19 21:00
引用第2楼eddylau于2010-01-19 13:13发表的  :


看看这个帖子便清楚了:

"打开Qtopia2.2应用程序开发的神秘面纱(x86+arm+源代码+多媒体影音解说)"
.......


非常感谢版主!我在看了您的几点建议后,后经过思考排查.终于编译通过!
显示出了一个自己编写的Qtopia应用程序!
我将后续整理后,将我的步骤公布于大家。多思考思考版主帖子的几点总结,都是精华.在此再次感谢版主!
对知识的追求永无止境
级别: 新手上路
UID: 16485
精华: 0
发帖: 32
金钱: 160 两
威望: 32 点
综合积分: 64 分
注册时间: 2010-03-18
最后登录: 2014-08-24
7楼  发表于: 2010-03-19 17:24
问题问题一堆一堆