ubantu中下载编译安装qt5.15.3

操作步骤如下:

  1. 克隆 Qt 仓库:

git clone https://code.qt.io/qt/qt5.git

cd qt5

  1. 切换到 Qt 5.15.3 标签:

git checkout v5.15.3-lts-lgpl

  1. 初始化子模块:

perl init-repository

  1. 配置和编译 Qt:
cpp 复制代码
 ./configure -prefix $HOME/Qt5.15.3 -opensource -confirm-license -nomake tests -nomake examples  
make -j8
make install 

编译错误解决:

  1. 如第四步编译报错如下:error: 'numeric_limits' is not a member of 'std' ,原因:说明 Qt 5.15.3 源码中 XX文件中用到了 std::numeric_limits,但是当前文件没有 #include ,导致编译器找不到它;这是一个编译器版本兼容性问题,尤其常见于使用 GCC 10+ 或 GCC 11+ 编译 Qt 老版本源码时。
    解决方法:

#include //那个文件缺少定义,就在那个头文件添加

相关推荐
Y1rong2 小时前
C++ QT之记事本
开发语言·qt
diegoXie6 小时前
Python / R 向量顺序分割与跨步分割
开发语言·python·r语言
程序员小白条6 小时前
0经验如何找实习?
java·开发语言·数据结构·数据库·链表
liulilittle6 小时前
C++ 浮点数封装。
linux·服务器·开发语言·前端·网络·数据库·c++
IOT-Power6 小时前
QT 串口 源码结构框架
qt
失散136 小时前
Python——1 概述
开发语言·python
萧鼎6 小时前
Python 图像哈希库 imagehash——从原理到实践
开发语言·python·哈希算法
小小8程序员7 小时前
STL 库(C++ Standard Template Library)全面介绍
java·开发语言·c++
立志成为大牛的小牛7 小时前
数据结构——五十六、排序的基本概念(王道408)
开发语言·数据结构·程序人生·算法
老王熬夜敲代码7 小时前
C++中的atomic
开发语言·c++·笔记·面试