• 4564阅读
  • 6回复

关于编译应用程序时,qt和qte库的问题 [复制链接]

上一主题 下一主题
离线陈媛媛
 
只看楼主 倒序阅读 楼主  发表于: 2006-10-27
我成功的安装上qt-2.3.7.qtopia-1.7.0,tmake-1.11,qt-x11-2.3.2后,对应用程序进行编译,发现,qmake -project,qmake make编译的过去,但是tmake。。make编译不过去。不知道为什么,大家能帮我分析一下吗?
出现的错误如下:
make
arm-linux-g++ -o dirview dirview.o main.o moc_dirview.o -L/usr/local/arm/qte/lib -L/usr/local/arm/3.3.2/lib -lqte -lm
dirview.o(.gnu.linkonce.r._ZTI8FileItem+0x8): undefined reference to `typeinfo for QListViewItem'
dirview.o(.gnu.linkonce.r._ZTI9Directory+0x8): undefined reference to `typeinfo for QListViewItem'
dirview.o(.gnu.linkonce.r._ZTI6QGList+0x8): undefined reference to `typeinfo for QCollection'
moc_dirview.o(.gnu.linkonce.r._ZTV13DirectoryView+0x14c): undefined reference to `QWidget::x11Event(_XEvent*)'
moc_dirview.o(.gnu.linkonce.r._ZTV13DirectoryView+0x2a8): undefined reference to `QPaintDevice::setX11Data(QPaintDeviceX11Data const*)'
moc_dirview.o(.gnu.linkonce.r._ZTI13DirectoryView+0x8): undefined reference to `typeinfo for QListView'
collect2: ld returned 1 exit status
make: *** [dirview] Error 1
还有编译qte等时用的./configure -xplatform linux-arm-g++,但是交叉编译工具cross-3.3.2中只有arm-linux-g++是不是我编译qte等时错了,应用arm-linux-g++
[ 此贴被XChinux在2006-11-16 23:12重新编辑 ]
仁者无敌
离线shiroki

只看该作者 1楼 发表于: 2006-10-29
从你的命令行里看不出错误
只能猜测为你编译时用的头文件位置和你的库不匹配
--
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-10-30
我是如此设置的:
[root@localhost s]# export PATH=/usr/local/arm/3.3.2/bin:$PATH
[root@localhost s]# export QTDIR=/usr/local/arm/qte
[root@localhost s]# export QPEDIR=/usr/local/arm/qtopia
[root@localhost s]# export LD_LIBRARY_PATH=$QTDIR/lib:$QPEDIR/lib:$LD_LIBRARY_PATH
[root@localhost s]# export TMAKEPATH=/usr/local/arm/tmake-1.11/lib/qws/linux-arm-g++
[root@localhost s]# tmake s.pro -o Makefile
[root@localhost s]# make
程序是qt帮助中的例子程序。qt2.3.7 qtopia,tmake,qt-x11是按照安装文档装的
仁者无敌
离线shiroki

只看该作者 3楼 发表于: 2006-10-30
还是看不出什么问题来
你把用tmake生成的makefile和qmake生成的比较一下, 看看编译的命令行有什么区别
--
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
离线陈媛媛
只看该作者 4楼 发表于: 2006-10-31
问题已解决,谢谢 shiroki大哥阿
仁者无敌
离线shiroki

只看该作者 5楼 发表于: 2006-10-31
什么错误阿, 说来听听, 也让我长长见识
--
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
离线陈媛媛
只看该作者 6楼 发表于: 2006-11-01
就是qte库小了,我重新编译,把qte库变大就可以了
仁者无敌
快速回复
限100 字节
 
上一个 下一个