安装步骤
1 | ./configure -prefix 自定义路径 |
qt安装包下载:http://download.qt.io/archive/qt/
安装步骤:http://doc.qt.io/qt-5/linux.html
使用文档:http://www.qt.io/developers/
问题解决
在make编译过程中,会出现许多编译问题。在参考编译出错报告后,进行搜索解决。现记录如下。
问题1
1 | In file included from kernel/qtaddons_x11.cpp:25:0: |
- 解决方案
安装所需的libdev开发库:http://doc.qt.io/qt-5/linux-requirements.html
将里面提到的dev都装一下就没问题了。
问题2
1 | ../include/qvaluelist.h:91:13: error: ‘ptrdiff_t’ does not name a type |
- 解决方案
将qvaluelist.h,qmap.h 文件中, 增加一行:include
问题原理说明为:
https://gcc.gnu.org/gcc-4.6/porting_to.html
https://forum.qt.io/topic/16531/error-ptrdiff_t-does-not-name-a-type/2
问题3
1 | error while loading shared libraries: libqt.so.3: |
- 解决方案
问题原理:http://www.cnblogs.com/yunsicai/p/3458072.html
1 | 进入/etc/ld.so.conf.d |
最后不要忘记 make install
,安装软件到指定目录中。