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.



  





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值