deepin-15.4下Qt软件开发环境的搭建步骤。
Tofloor
poster avatar
186******92
deepin
2017-04-20 10:13
Author
1、从qt网站下载qt二进制安装包:    http://download.qt.io/official_releases/qt/5.8/5.8.0/qt-opensource-linux-x64-5.8.0.run 。

2、改变二进制安装包文件属性为所有用户可读可写可执行:    chmod 777 qt-opensource-linux-x64-5.8.0.run 。

3、用root权限安装二进制安装包:    sudo ./qt-opensource-linux-x64-5.8.0.run 。

4、用root权限安装C++语言编译器g++,因为linux版qt的二进制安装包里没带编译器:    sudo apt-get install g++ 。

5、用root权限安装程序调试器gdb,因为linux版qt的二进制安装包里没带调试器:    sudo apt-get install gdb 。

6、链接openGL图形库的库文件从源目录到系统默认的库目录,因为deepin的系统里openGL库文件不在qt的默认搜索库目录下,而qt的图形界面程序要用到此库:    sudo ln -s /usr/lib/x86_64-linux-gnu/libGL.so.1.2.0  /usr/lib/libGL.so 。

7、开始用qt创建你的第一个QtWidgetsApplication吧。

Reply Favorite View the author
All Replies
avatar
kingskill
deepin
2017-04-20 10:18
#1
战马下。。。
Reply View the author
avatar
jingle
deepin
2017-04-20 14:45
#2
感谢分享
Reply View the author
avatar
wangqizai1918
deepin
2017-04-20 15:10
#3
借楼问一下,怎么才能只安装qt的开发环境而不安装那个IDE?
Reply View the author
avatar
186******92
deepin
2017-04-20 16:28
#4
https://bbs.deepin.org/post/137949
借楼问一下,怎么才能只安装qt的开发环境而不安装那个IDE?

是只装qt库吗?我没试过,你试试“sudo apt-get insall qt”,应该是不会成功,而是给出一堆qt相关的包供选择,到时看看只选择自己要装的包能不能行。
Reply View the author
avatar
justforlxz
deepin
2017-04-20 17:13
#5
只需要安装qtcreator  qt5-default gcc g++ cmake这几个包就可以了,,就是基础的包了,仓库里有的,虽然你这种方式也可以吧~  从官网下的包好处就是没拆包,东西不会缺,仓库有拆包,要装一些包才可以,有些麻烦。
Reply View the author
avatar
186******92
deepin
2017-04-21 04:52
#6
https://bbs.deepin.org/post/137949
是只装qt库吗?我没试过,你试试“sudo apt-get insall qt”,应该是不会成功,而是给出一堆qt相关的包供 ...

经试验,输入sudo apt-get install qt之后,按tab键(即命令自动补齐键),就可以列出备选的各种qt包。
Reply View the author
avatar
comzhong
deepin
2017-04-21 05:40
#7
本帖最后由 comzhong 于 2017-4-20 21:42 编辑

还缺少fcitx中文输入支持,这是我安装run后用的shell脚本,包含你的4、5、6几步。
  1. #!/bin/bash

  2. sudo apt-get install gcc g++ gdb cmake
  3. sudo ln -s /usr/lib/i386-linux-gnu/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
  4. sudo ln -s /usr/lib/x86_64-linux-gnu/libGL.so.1 /usr/lib/x86_64-linux-gnu/libGL.so

  5. #输入中文
  6. userdir=`env | grep ^HOME= | cut -c 6-`
  7. qt5Creator=/Qt5.8.0/Tools/QtCreator/lib/Qt/plugins/platforminputcontexts
  8. qt5gcc_64=/Qt5.8.0/5.8/gcc_64/plugins/platforminputcontexts

  9. sudo apt-get install fcitx-libs-qt5

  10. sudo cp  /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so $userdir$qt5Creator
  11. sudo chmod +x $userdir$qt5Creator/libfcitxplatforminputcontextplugin.so

  12. sudo cp  /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so $userdir$qt5gcc_64
  13. sudo chmod +x $userdir$qt5gcc_64/libfcitxplatforminputcontextplugin.so
Copy the Code


Reply View the author
avatar
186******92
deepin
2017-04-21 17:25
#8
本帖最后由 gorf999 于 2017-4-21 09:27 编辑
https://bbs.deepin.org/post/137949
还缺少fcitx中文输入支持,这是我安装run后用的shell脚本,包含你的4、5、6几步。

经试验,确实不支持中文,真奇怪,居然还要另外装插件,而不是直接跟系统绑定,或许跟输入法也是外置的有关。这可不太好,应该有个中间层,做到输入法平台无关性。
另外,脚本中后面的两个cp行是以qt装在用户目录下为前提的吧,用sudo装的时候,当初qt默认是装在/opt目录下的。linux的这种复杂性可真不好。
Reply View the author
avatar
sunhanwu
deepin
2017-10-22 08:54
#9
请问安装到一般卡死怎么解决
Reply View the author
avatar
stevenkoh
deepin
2018-01-05 23:23
#10
请教版主,我安装出现ssl连接错误,何故?

我是32位deepin,安装 qt 5.51

steven@steven-pc:~/Downloads$ sudo ./qt-opensource-linux-x86-5.5.1.run
qt.network.ssl: QSslSocket: cannot resolve CRYPTO_num_locks
qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_id_callback
qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_locking_callback
qt.network.ssl: QSslSocket: cannot resolve ERR_free_strings
qt.network.ssl: QSslSocket: cannot resolve sk_new_null
qt.network.ssl: QSslSocket: cannot resolve sk_push
qt.network.ssl: QSslSocket: cannot resolve sk_free
qt.network.ssl: QSslSocket: cannot resolve sk_num
qt.network.ssl: QSslSocket: cannot resolve sk_pop_free
qt.network.ssl: QSslSocket: cannot resolve sk_value
qt.network.ssl: QSslSocket: cannot resolve SSL_library_init
qt.network.ssl: QSslSocket: cannot resolve SSL_load_error_strings
qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method
qt.network.ssl: QSslSocket: cannot resolve SSLv3_client_method
qt.network.ssl: QSslSocket: cannot resolve SSLv23_client_method
qt.network.ssl: QSslSocket: cannot resolve SSLv2_server_method
qt.network.ssl: QSslSocket: cannot resolve SSLv3_server_method
qt.network.ssl: QSslSocket: cannot resolve SSLv23_server_method
qt.network.ssl: QSslSocket: cannot resolve X509_STORE_CTX_get_chain
qt.network.ssl: QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf
qt.network.ssl: QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf
qt.network.ssl: QSslSocket: cannot resolve SSLeay
qt.network.ssl: QSslSocket: cannot resolve SSLeay_version
qt.network.ssl: QSslSocket: cannot call unresolved function CRYPTO_num_locks
qt.network.ssl: QSslSocket: cannot call unresolved function CRYPTO_set_id_callback
qt.network.ssl: QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_library_init
Could not register file downloader for https protocol: QSslSocket::supportsSsl() returns false
[17] Warning: QSslSocket: cannot call unresolved function SSLv23_client_method
[20] Warning: QSslSocket: cannot call unresolved function sk_num
段错误
Reply View the author
avatar
ax******er@126.com
deepin
2018-01-06 00:22
#11
https://bbs.deepin.org/post/137949
请教版主,我安装出现ssl连接错误,何故?

我是32位deepin,安装 qt 5.51

32位放弃治疗吧
Reply View the author
avatar
六七八九十
deepin
2018-01-06 01:17
#12
qt.io在我这边好慢啊,
Reply View the author
avatar
paopao123
deepin
2018-01-06 02:48
#13
mianyz 发表于 2018-1-5 17:17
qt.io在我这边好慢啊,

科大有镜像
Reply View the author
avatar
六七八九十
deepin
2018-01-06 02:49
#14

我还真不知道
Reply View the author
avatar
135******79
deepin
2018-01-06 03:32
#15
sudo apt-cache search qt
Reply View the author
avatar
yanger
deepin
2019-02-21 22:38
#16
https://bbs.deepin.org/post/137949
请问安装到一般卡死怎么解决

等会就好了,大概2-3分钟 吧。
Reply View the author