• 5217阅读
  • 2回复

请教应用程序出现的问题 [复制链接]

上一主题 下一主题
离线陈媛媛
 
只看楼主 倒序阅读 楼主  发表于: 2006-12-03
我成功的在板子上移植了一个编译好的浏览界面的程序,后来想在里面添加一些东西,但是编译的出现下面的问题,清高人指点一下,好吗? 非常感谢
I/usr/local/arm/qt/include -I/usr/local/arm/qtopia/include -o moc_mainwindow.o moc_mainwindow.cpp
/usr/local/arm/qt/bin/moc qfileiconview.h -o moc_qfileiconview.cpp
arm-linux-g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/usr/local/arm/qt/include -I/usr/local/arm/qtopia/include -o moc_qfileiconview.o moc_qfileiconview.cpp
arm-linux-gcc -o file filebrowser.o main.o qfileiconview.o moc_filebrowser.o moc_mainwindow.o moc_qfileiconview.o -L/opt/host/armv4l/lib -L/usr/local/arm/qtopia/lib -L/usr/local/arm/qt/lib -lm -lqpe -lqtopia -lqte -luuid
/opt/host/armv4l/armv4l-unknown-linux/bin/ld: warning: libuuid.so.1, needed by /usr/local/arm/qtopia/lib/libqtopia.so, not found (try using --rpath)
main.o: In function `main':
main.o(.text+0x34): undefined reference to `FileMainWindow::FileMainWindow(void)'
main.o(.text+0x34): relocation truncated to fit: R_ARM_PC24 FileMainWindow::FileMainWindow(void)
main.o(.text+0xac): undefined reference to `FileMainWindow::show(void)'
main.o(.text+0xac): relocation truncated to fit: R_ARM_PC24 FileMainWindow::show(void)
moc_mainwindow.o(.rodata+0x20): undefined reference to `FileMainWindow::directoryChanged(QString const &)'
moc_mainwindow.o(.rodata+0x28): undefined reference to `FileMainWindow::slotStartReadDir(int)'
moc_mainwindow.o(.rodata+0x30): undefined reference to `FileMainWindow::slotReadNextDir(void)'
moc_mainwindow.o(.rodata+0x38): undefined reference to `FileMainWindow::slotReadDirDone(void)'
moc_mainwindow.o(.rodata+0x40): undefined reference to `FileMainWindow::cdUp(void)'
moc_mainwindow.o(.rodata+0x48): undefined reference to `FileMainWindow::newFolder(void)'
moc_mainwindow.o(.rodata+0x50): undefined reference to `FileMainWindow::changePath(QString const &)'
moc_mainwindow.o(.rodata+0x58): undefined reference to `FileMainWindow::enableUp(void)'
moc_mainwindow.o(.rodata+0x60): undefined reference to `FileMainWindow::disableUp(void)'
moc_mainwindow.o(.rodata+0x68): undefined reference to `FileMainWindow::enableMkdir(void)'
moc_mainwindow.o(.rodata+0x70): undefined reference to `FileMainWindow::disableMkdir(void)'
moc_mainwindow.o(.gnu.linkonce.d.__vt_14FileMainWindow+0xa0): undefined reference to `FileMainWindow::show(void)'
collect2: ld returned 1 exit status
make: *** [file] Error 1

返回页首
[ 此贴被XChinux在2006-12-06 11:05重新编辑 ]
仁者无敌
离线shiroki

只看该作者 1楼 发表于: 2006-12-04
从你的log信息里看到了两个错误:
1、 /opt/host/armv4l/armv4l-unknown-linux/bin/ld: warning: libuuid.so.1, needed by /usr/local/arm/qtopia/lib/libqtopia.so, not found (try using --rpath)
这个uuid的库交叉编译好了吗? 要放在toolchain的targetfs路径下,一般是toolchain/arm-linux/lib, 你可以搜一下, 找找像libpthread之类的库放在哪里了, cp到相同位置

2、 undefined reference
从错误信息来看,那些函数应该是在mainwindow.cpp里的吧?
但是你这个编译的命令行里没有mainwindow.o......

arm-linux-g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/usr/local/arm/qt/include -I/usr/local/arm/qtopia/include -o moc_qfileiconview.o moc_qfileiconview.cpp
arm-linux-gcc -o file filebrowser.o main.o qfileiconview.o moc_filebrowser.o moc_mainwindow.o moc_qfileiconview.o -L/opt/host/armv4l/lib -L/usr/local/arm/qtopia/lib -L/usr/local/arm/qt/lib -lm -lqpe -lqtopia -lqte -luuid

这个问题比较怪,是不是pro文件没写好?
--
shiro is White
ki is tree
http://www.cuteqt.com
论坛 http://www.cuteqt.com/bbs
博客 http://www.cuteqt.com/blog
博客镜像: http://sites.cuteqt.com/cuteqt
Linux/Qt/嵌入式讨论群 http://qun.qq.com/air/5699823
离线陈媛媛
只看该作者 2楼 发表于: 2006-12-06
问题解决,谢谢斑竹阿
仁者无敌
快速回复
限100 字节
 
上一个 下一个