[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
阅读(2239) | 评论(0) | 转发(0) |