编写第一个qt应用程序的步骤及遇到的问题:
[root@localhost hello]# cp /root/Desktop/code-qt/9.1-hello/hello/hello.cpp ./
[root@localhost hello]# ls
hello.cpp
[root@localhost hello]# progen -t app.t -o hello.pro
[root@localhost hello]# tmake -o Makefile hello.pro
[root@localhost hello]# vi Makefile
[root@localhost hello]# make
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qt2/include -o hello.o hello.cpp
g++ -o hello hello.o -L/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qt2/lib -lqte -lm -lstdc++
/usr/bin/ld: cannot find -lqte
collect2: ld returned 1 exit status
make: *** [hello] Error 1
[root@localhost hello]#
解决方案(在终端输入如下命令即可):
yum -y install libtool-l*
我解决后的状况:
[root@localhost ~]# yum -y install libtool-l*
Loaded plugins: refresh-packagekit
updates-newkey | 3.4 kB 00:00
fedora | 2.4 kB 00:00
updates 100% |========== | 0.0 B/s | 2.6 kB --:-updates | 2.6 kB 00:00
Setting up Install Process
Parsing package install arguments
Package libtool-ltdl-1.5.24-6.fc9.i386 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package libtool-ltdl-devel.i386 0:1.5.24-6.fc9 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
libtool-ltdl-devel i386 1.5.24-6.fc9 fedora 34 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 34 k
Downloading Packages:
(1/1): libtool-ltdl-de 47% | 47% |==== | 0.0 B/s | 16 kB --:-(1/1): libtool-ltdl-devel-1.5.24-6.fc9.i386.rpm | 34 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: libtool-ltdl-devel ######################### [1/1]
Installed: libtool-ltdl-devel.i386 0:1.5.24-6.fc9
Complete!
[root@localhost ~]#
[root@localhost ~]#