免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1092 | 回复: 0
打印 上一主题 下一主题

qt 出错 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-07 11:12 |只看该作者 |倒序浏览

                                [root@localhost hello_example]# make
arm-linux-g++  -o hello hello.o   -L/pxa256/qt-2.3.7//lib -lm -lqte
/pxa256/qt-2.3.7//lib/libqte.so: undefined reference to `pthread_create'
/pxa256/qt-2.3.7//lib/libqte.so: undefined reference to `pthread_mutexattr_destr       oy'
/pxa256/qt-2.3.7//lib/libqte.so: undefined reference to `pthread_mutexattr_setty       pe'
/pxa256/qt-2.3.7//lib/libqte.so: undefined reference to `pthread_mutexattr_init'
/pxa256/qt-2.3.7//lib/libqte.so: undefined reference to `pthread_mutex_trylock'
/pxa256/qt-2.3.7//lib/libqte.so: undefined reference to `pthread_cond_timedwait'
==============
现在的改变名称用以前的:
[root@localhost qt-2.3.7]# mv lib lib_5.8
用以前的
mv lib_first_success_4.20 lib
但还是出错
[root@localhost hello_example]# make
arm-linux-g++  -o hello hello.o   -L/pxa256/qt-2.3.7//lib -lm -lqte
/pxa256/qt-2.3.7//lib/libqte.so: undefined reference to `pthread_create'
/pxa256/qt-2.3.7//lib/libqte.so: undefined reference to `pthread_mutexattr_destroy'
/pxa256/qt-2.3.7//lib/libqte.so: undefined reference to `pthread_mutexattr_settype'
/pxa256/qt-2.3.7//lib/libqte.so: undefined reference to `pthread_mutexattr_init'
/pxa256/qt-2.3.7//lib/libqte.so: undefined reference to `pthread_mutex_trylock'
/pxa256/qt-2.3.7//lib/libqte.so: undefined reference to `pthread_cond_timedwait'
collect2: ld returned 1 exit status
make: *** [hello] Error 1
上网查了查,说是没编译多线程,但是以前就加了啊,还成功过。
用了以前 qt-2.3.7-noerror-no-jpeg-2.20 改名 qt-2.3.7没报错,成功了,看来库有问题,现在这个库为qt-2.3.7
但今天用designer写的程序在make时除了上面的错,这个错还没解决
arm-linux-g++  -o hello hello.o main.o moc_hello.o  -L/pxa256/qt-2.3.7/lib -lm -lqte
moc_hello.o: In function `hello::staticMetaObject(void)':
moc_hello.o(.text+0x164): undefined reference to `QMetaObject::new_metaobject(char const *, char const *, QMetaData *, int, QMetaData *, int, QMetaProperty *, int, QMetaEnum *, int, QClassInfo *, int)'
moc_hello.o(.rodata+0x168): undefined reference to `QWidget::dragEnterEvent(QDragEnterEvent *)'
moc_hello.o(.rodata+0x16c): undefined reference to `QWidget::dragMoveEvent(QDragMoveEvent *)'
moc_hello.o(.rodata+0x170): undefined reference to `QWidget::dragLeaveEvent(QDragLeaveEvent *)'
moc_hello.o(.rodata+0x174): undefined reference to `QWidget::dropEvent(QDropEvent *)'
====================================一看此终端下的环境变量改了,并且makefile里面用到qt-2.3.7/include里的文件,而在此终端下设成了另外一个值。换了一个终端后,生成功了。
谢天谢地。
终结::
1库有问题。还不是真成功
2uic工具qt-2.3.2
               
               
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/63775/showart_679765.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP