Qt/QTE 编译安装问题与解决方法 (3)


yesterday 's problem has been solved.

all shell commands are as follows.
  1. [john@localhost ~]$ su
  2. 密码:
  3. [root@localhost john]# cd ~/2410clQt
  4. [root@localhost 2410clQt]# # export QT2DIR=/root/2410clQt/qt-2.3.2
  5. [root@localhost 2410clQt]# #  export QTDIR=$QT2DIR
  6. [root@localhost 2410clQt]# #  export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
  7. [root@localhost 2410clQt]# # export QTEDIR=$PWD/qt-2.3.10
  8. [root@localhost 2410clQt]# # $QTEDIR/bin/qvfb -width 640 -height 480
  9. [root@localhost 2410clQt]# # export QT2DIR=/root/2410clQt/qt-2.3.2
  10. [root@localhost 2410clQt]# #  export QTDIR=$QT2DIR
  11. [root@localhost 2410clQt]# #  export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
  12. [root@localhost 2410clQt]# # export QTEDIR=$PWD/qt-2.3.10
  13. [root@localhost 2410clQt]#  export QT2DIR=/root/2410clQt/qt-2.3.2
  14. [root@localhost 2410clQt]#   export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH[root@localhost 2410clQt]#  export QTEDIR=$PWD/qt-2.3.10
  15. [root@localhost 2410clQt]#  $QTEDIR/bin/qvfb -width 640 -height 480
  16. /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
  17. [root@localhost 2410clQt]# export QTDIR=$QT2DIR
  18. [root@localhost 2410clQt]#  $QTEDIR/bin/qvfb -width 640 -height 480
  19. /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
  20. [root@localhost 2410clQt]# export QT2DIR=/root/2410clQt/qt-2.3.2
  21. [root@localhost 2410clQt]# export QTDIR=$QT2DIR
  22. [root@localhost 2410clQt]# export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
  23. [root@localhost 2410clQt]# export QTEDIR=$PWD/qt-2.3.10
  24. [root@localhost 2410clQt]# $QTEDIR/bin/qvfb -width 640 -height 480
  25. Using display 0
  26. [root@localhost 2410clQt]# $QTEDIR/bin/qvfb -width 640 -height 480 &
  27. [1] 2975
  28. [root@localhost 2410clQt]# Using display 0
  29. cd exp
  30. [root@localhost exp]# ls
  31. hello  hello.cpp  hello.pro  Makefile
  32. [root@localhost exp]# ./hello -qws
  33. ./hello: error while loading shared libraries: libqte.so.2: cannot open shared object file: No such file or directory
  34. [root@localhost exp]# export QTDIR=/root/2410clQt/qt-2.3.10
  35. [root@localhost exp]# ./hello -qws
  36. ./hello: error while loading shared libraries: libqte.so.2: cannot open shared object file: No such file or directory
  37. [root@localhost exp]#  export QTEDIR=/root/2410clQt/qt-2.3.10
  38. [root@localhost exp]# ./hello -qws
  39. ./hello: error while loading shared libraries: libqte.so.2: cannot open shared object file: No such file or directory
  40. [root@localhost exp]# export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
  41. [root@localhost exp]# ./hello -qws
  42. 段错误
  43. [root@localhost exp]# make
  44. 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
  45. g++  -o hello hello.o   -L/root/2410clQt/qt-2.3.10/lib -lm -lqte
  46. [root@localhost exp]# ls
  47. hello  hello.cpp  hello.o  hello.pro  Makefile
  48. [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.



  





你可能感兴趣的:(shell,list,qt,Path,library)