yesterday 's problem has been solved.
all shell commands are as follows.
- [john@localhost ~]$ su
- 密码:
- [root@localhost john]# cd ~/2410clQt
- [root@localhost 2410clQt]# # export QT2DIR=/root/2410clQt/qt-2.3.2
- [root@localhost 2410clQt]# # export QTDIR=$QT2DIR
- [root@localhost 2410clQt]# # export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
- [root@localhost 2410clQt]# # export QTEDIR=$PWD/qt-2.3.10
- [root@localhost 2410clQt]# # $QTEDIR/bin/qvfb -width 640 -height 480
- [root@localhost 2410clQt]# # export QT2DIR=/root/2410clQt/qt-2.3.2
- [root@localhost 2410clQt]# # export QTDIR=$QT2DIR
- [root@localhost 2410clQt]# # export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
- [root@localhost 2410clQt]# # export QTEDIR=$PWD/qt-2.3.10
- [root@localhost 2410clQt]# export QT2DIR=/root/2410clQt/qt-2.3.2
- [root@localhost 2410clQt]# export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH[root@localhost 2410clQt]# export QTEDIR=$PWD/qt-2.3.10
- [root@localhost 2410clQt]# $QTEDIR/bin/qvfb -width 640 -height 480
- /root/2410clQt/qt-2.3.10/bin/qvfb: error while loading shared libraries: libqt.so.2: cannot open shared object file: No such file or directory
- [root@localhost 2410clQt]# export QTDIR=$QT2DIR
- [root@localhost 2410clQt]# $QTEDIR/bin/qvfb -width 640 -height 480
- /root/2410clQt/qt-2.3.10/bin/qvfb: error while loading shared libraries: libqt.so.2: cannot open shared object file: No such file or directory
- [root@localhost 2410clQt]# export QT2DIR=/root/2410clQt/qt-2.3.2
- [root@localhost 2410clQt]# export QTDIR=$QT2DIR
- [root@localhost 2410clQt]# export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
- [root@localhost 2410clQt]# export QTEDIR=$PWD/qt-2.3.10
- [root@localhost 2410clQt]# $QTEDIR/bin/qvfb -width 640 -height 480
- Using display 0
- [root@localhost 2410clQt]# $QTEDIR/bin/qvfb -width 640 -height 480 &
- [1] 2975
- [root@localhost 2410clQt]# Using display 0
- cd exp
- [root@localhost exp]# ls
- hello hello.cpp hello.pro Makefile
- [root@localhost exp]# ./hello -qws
- ./hello: error while loading shared libraries: libqte.so.2: cannot open shared object file: No such file or directory
- [root@localhost exp]# export QTDIR=/root/2410clQt/qt-2.3.10
- [root@localhost exp]# ./hello -qws
- ./hello: error while loading shared libraries: libqte.so.2: cannot open shared object file: No such file or directory
- [root@localhost exp]# export QTEDIR=/root/2410clQt/qt-2.3.10
- [root@localhost exp]# ./hello -qws
- ./hello: error while loading shared libraries: libqte.so.2: cannot open shared object file: No such file or directory
- [root@localhost exp]# export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
- [root@localhost exp]# ./hello -qws
- 段错误
- [root@localhost exp]# make
- g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -DNO_DEBUG -I/root/2410clQt/qt-2.3.10/include -o hello.o hello.cpp
- g++ -o hello hello.o -L/root/2410clQt/qt-2.3.10/lib -lm -lqte
- [root@localhost exp]# ls
- hello hello.cpp hello.o hello.pro Makefile
- [root@localhost exp]# ./hello -qws
the program run at line 41 is still yesterday's.
but the hello.cpp which compiled at line 43, has been changed. I replace it with the code copy from the direction book, it list at page 144 at this book.