Qt源程序编译及错误问题解决
Error 5 while parsing C:/qt-everywhere-src-6.6.2/qt-build/qtdeclarative/src/qmlmodels/meta_types/qt6qmlmodels_release_metatypes.json: illegal value
.json 文件为空文件0字节,加 “[]”,不要引号。可以解决这类错误。

Qt编译
Qt for Windows - Building from Source | Qt 6.6
“https://doc.qt.io/qt-6/windows-building.html”
Qt for Windows - Building from Source
This page describes the process of configuring and building Qt for Windows. To download and install a pre-built Qt for Windows, follow the instructions on the Getting Started with Qt page.
Step 1: Getting the Sources
Qt sources can be installed in Qt Online Installer. Source packages are also available as Git repositories, as archives in the Qt Account (commercial users), and on download.qt.io (open-source users).
If you install the sources through Qt Online Installer, they will be available in the Qt installation directory, for instance C:\Qt\6.6.3\Src.
If you downloaded the source archive, extract it to a directory of your choice, for instance C:\dev\Qt\src.
Note: The path to the source directory must not contain any spaces or Windows-specific file system characters. The path should also be kept short. This prevents issues with too long file paths in the compilation phase.
Step 2: Installing Build Requirements and Set Environment
To build Qt from sources you need a build environment with a supported compiler and various build tools.
Build Tools
| Tool | Supported Versions | Description |
|---|---|---|
| CMake | Version 3.16 and newer (3.17 and newer for -debug-and-release builds 3.21 and newer for -static builds). | Required for configuring the Qt build. Available in Qt Online Installer and on cmake.org. |
| Ninja | - | Recommended tool for building Qt. Available in Qt Online Installer and on ninja-build.org. |
| Python | Version 3 | Required build tool. Windows installers are available on python.org, or from the Microsoft Store. |
The executables cmake.exe, ninja.exe, and python.exe must be available in your build environment. Add the respective directory to your PATH environment variable.
Compilers
The following compilers and configurations are supported in Qt 6.6:
| Operating System | Architecture | Compiler | |
|---|---|---|---|
| Windows 10 (1809 or later) | x86_64 | MSVC 2022, MSVC 2019, MinGW 11.2 | |
| Windows 11 | x86_64 | MSVC 2022, MSVC 2019, MinGW 11.2 | |
| Windows on ARM | arm64 | MSVC 2019/2022 | Technology Preview |
Note: Windows on ARM is only supported as a deployment target. Applications have to be cross-compiled from an x86-64 Windows machine and deployed to target.
QDoc Dependencies
QDoc uses Clang to parse C++ code. If you wish to build QDoc manually, refer to Installing Clang for QDoc for specific build requirements.
Setting the Environment
For MSVC, do one of the following:
- Run the vcvarsall.bat:
"C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsall.bat" amd64
- Search on the Windows search bar for the VS Native Tools command prompt.
For MinGW: Add MinGW to PATH environment variable:
Set PATH=C:\qt\tools\mingw1120_64\bin;%PATH%
Step 3: Building the Qt Libraries and Tools
To configure your build, create a build directory and run the configure.bat script in this directory:
mkdir C:\dev\qt-build cd C:\dev\qt-build C:\dev\Qt\src\configure.bat
By default, Qt is configured for installation in the C:\Qt\Qt-6.5.3 directory. This can be changed by using the -prefix option. See the list of Qt Configure Options to tweak further.
Then build the libraries and tools:
cmake --build . --parallel
Period after --build means current folder.
After building, you need to install the libraries and tools in the desired path (unless you enabled a developer build:
cmake --install .
Step 4: Using Qt
After Qt is installed, you can start building applications with it.
If you work from the command line, consider adding the Qt tools to your PATH environment variable as follows:
set PATH=C:\Qt\Qt-6.5.3\bin;%PATH%
If you plan to use Qt from an IDE, you need to register the Qt version explicitly there. For Qt Creator, see Qt Creator: Adding Qt Versions.
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.
也可以:
cmake .. -G"CodeBlocks - MinGW Makefiles"
mingw32-make 或者mingw32-make -k 忽略错误
mingw32-make install
最后,不知道的问题问问ChatGPT或者Kimi。
相关文章:
Qt源程序编译及错误问题解决
Error 5 while parsing C:/qt-everywhere-src-6.6.2/qt-build/qtdeclarative/src/qmlmodels/meta_types/qt6qmlmodels_release_metatypes.json: illegal value .json 文件为空文件0字节,加 “[]”,不要引号。可以解决这类错误。 Qt编译 Qt for Windows…...
作业练习(python)
第一题: cel eval(input()) fah 9 / 5 * cel 32 print("%.1f" % fah) 第二题: radius, length eval(input()) area radius * radius * 3.14159267 volume area * length print("%.2f" % area) print("%.2f" …...
Wireshark使用相关
1.wireshark如何查看RST包 tcp.flags.reset1 RST表示复位,用来异常的关闭连接,在TCP的设计中它是不可或缺的。发送RST包关闭连接时,不必等缓冲区的包都发出去(不像上面的FIN包),直接就丢弃缓存区的包发送R…...
相机标定学习记录
相机标定是计算机视觉和机器视觉领域中的一项基本技术,它的主要目的是通过获取相机的内部参数(内参)和外部参数(外参),以及镜头畸变参数,建立起现实世界中的点与相机成像平面上对应像素点之间准…...
CSS 滚动条样式修改
1、滚动条整体部分 使用 ::-webkit-scrollbar 注意:这个必须要加,不然修改的样式不生效 ::-webkit-scrollbar {width: 10px;//修改滚动条宽度 }2、滚动条中的滑块 使用 ::-webkit-scrollbar-thumb ::-webkit-scrollbar-thumb {border-radius: 8px;b…...
谈谈配置中心?
配置中心可以做集中式的服务配置管理,比如配置一些数据库连接的URL,一些共用的配置且可动态调整的参数。如果不采用集中式的管理,会导致修改起来特别麻烦,一个个的修改特别繁琐。 Nacos Config配置中心中采用的是客户端拉取数据&a…...
人工智能(pytorch)搭建模型25-基于pytorch搭建FPN特征金字塔网络的应用场景,模型结构介绍
大家好,我是微学AI,今天给大家介绍一下人工智能(pytorch)搭建模型25-基于pytorch搭建FPN特征金字塔网络的应用场景,模型结构介绍。特征金字塔网络(FPN)是一种深度学习模型结构,主要应用于目标检测任务中&am…...
JRT业务开发起步
这是一段充满挑战与奋斗的旅程,自第一行Java代码的写下起,便历经重重险阻。从细微的代码行,逐步汇聚成实用的工具类方法;从工具类方法的积累,逐渐构建起功能强大的工具包;再从工具包的整合,最终…...
深度解析:国内主流音视频产品的核心功能与市场表现
前言 当前音视频开发领域呈现出多样化竞争态势,其中声网(Agora)、即构(ZEGO)等云通讯企业占据了市场的主导地位。随着技术的持续进步和用户需求的日益多样化,选择音视频服务提供商的标准也越来越个性化&am…...
红黑树介绍及插入操作的实现
🎉个人名片: 🐼作者简介:一名乐于分享在学习道路上收获的大二在校生 🙈个人主页🎉:GOTXX 🐼个人WeChat:ILXOXVJE 🐼本文由GOTXX原创,首发CSDN&…...
[linux初阶][vim-gcc-gdb] TwoCharter: gcc编译器
目录 一.Linux中gcc编译器的下载与安装 二.使用gcc编译器来翻译 C语言程序 ①.编写C语言代码 ②翻译C语言代码 a.预处理 b.编译 c.汇编 d.链接 ③.执行Main 二进制可执行程序(.exe文件) 三.总结 一.Linux中gcc编译器的下载与安装 使用yum命令(相当于手机上的应用…...
单例设计模式(2)
单例设计模式(2) 单例模式存在的问题 单例对 OOP 特性的支持不友好 oop的特性:封装、继承、多态、抽象;以Id生成器代码为例,如果未来某一天,我们希望针对不同的业务采用不同的 ID 生成算法。比如&#x…...
boost::asio 启用 io_uring(Linux 5.10)队列支持
欲启用 boost::asio 对于 io_uring 的支持,这需要以下几个先决条件; 1、boost 1.78 及以上发行版本 Revision History - 1.78.0 (boost.org) 2、Linux kernel 5.10 及以上发行版本 3、在预定义头文件(stdafx.h)、或编译器预定义…...
Android 自定义坐标曲线图(二)
Android 自定义坐标曲线图_android 自定义曲线图-CSDN博客 继上一篇文章,点击折线图上的点,显示提示信息进行修改,之前通过回调,调用外部方法,使用popupwindow或dialog来显示,但是这种方法对于弹框显示的位…...
每日OJ题_子序列dp⑧_力扣446. 等差数列划分 II - 子序列
目录 力扣446. 等差数列划分 II - 子序列 解析代码 力扣446. 等差数列划分 II - 子序列 446. 等差数列划分 II - 子序列 难度 困难 给你一个整数数组 nums ,返回 nums 中所有 等差子序列 的数目。 如果一个序列中 至少有三个元素 ,并且任意两个相邻…...
GOPROXY 代理设置
通常报错: 1.http: server gave HTTP response to HTTPS client 2.timeout 解决指令:(会话临时性),长久的可以在配置文件中配置 go env -w GOPROXYhttps://goproxy.cn,direct 长久的,在~/.bashrc文件中添加: expo…...
Redis面经
Redis面经 Redis缓存穿透、缓存击穿和缓存雪崩及解决方案概述缓存穿透详解及解决方案缓存击穿详解及解决方案缓存雪崩详解及解决方案 Redis持久化机制什么是数据持久化?Redis数据持久化概述RDB持久化的优缺点AOF持久化混合持久化 Redis缓存穿透、缓存击穿和缓存雪崩…...
【c++】类和对象(六)深入了解隐式类型转换
🔥个人主页:Quitecoder 🔥专栏:c笔记仓 朋友们大家好,本篇文章我们来到初始化列表,隐式类型转换以及explicit的内容 目录 1.初始化列表1.1构造函数体赋值1.2初始化列表1.2.1隐式类型转换与复制初始化 1.3e…...
什么是nginx正向代理和反向代理?
什么是代理? 代理(Proxy), 简单理解就是自己做不了的事情或实现不了的功能,委托别人去做。 什么是正向代理? 在nginx中,正向代理指委托者是客户端,即被代理的对象是客户端 在这幅图中,由于左边内网中…...
【Go】面向萌新的Gin框架知识梳理学习笔记
目录 Gin框架简介 路由&路由组 1. 定义基本路由 2. 参数传递 3. 查询字符串参数 4. 路由组 5. 路由中间件 模板渲染 1. 加载模板 2. 定义模板 3. 渲染模板 4. 自定义模板函数 返回json 1. 导入 Gin 包 2. 创建 Gin 引擎 3. 定义路由和处理器函数 4. 运行服…...
SDPose-Wholebody模型在卷积神经网络架构上的创新优化
SDPose-Wholebody模型在卷积神经网络架构上的创新优化 人体姿态估计技术正在从简单的身体关节点检测向全身精细化识别演进,而SDPose-Wholebody通过创新的卷积神经网络架构设计,将这一技术推向了新的高度。 1. 核心架构设计突破 SDPose-Wholebody的最大创…...
手把手教你用STM32驱动迪文屏:从RS232配置到页面控件交互全流程
STM32与迪文屏深度开发实战:工业级GUI交互全解析 迪文屏作为工业控制领域广泛采用的HMI解决方案,其与STM32的协同工作能力已成为嵌入式开发者的必备技能。不同于传统TFT-LCD的简单驱动,迪文屏通过串口协议实现的动态交互,为设备控…...
Java中高效移除文本文件标点符号的实用指南
本教程详细阐述了在Java中从文本文件中有效删除标点符号的方法。我们将使用Java NIO的Files.lines()结合Streamm API,重点介绍正则表达式p{Punct}强大的功能,以简单、强大的方式实现文本清洁,避免传统硬编码的局限性,从而提高文本…...
基于dify智能客服工作流的多智能体架构实战:高并发场景下的设计与优化
背景痛点:当智能客服遭遇流量洪峰 最近在负责一个电商大促期间的智能客服系统保障,真切体会到了传统单体智能体架构的“力不从心”。我们的客服机器人基于一个大语言模型构建,平时QPS在50左右时,响应时间(RT࿰…...
AI写论文不再难,4款AI论文生成工具带你开启高效写作之旅!
在2025年愈演愈烈的学术写作智能化趋势中,越来越多的人选择借助AI写论文工具。现实中许多这样的工具在撰写硕士、博士论文等长篇学术作品时,常常缺乏必要的理论深度,逻辑也显得比较松散。普通的AI论文写作工具显然无法满足这些专业写作的需求…...
国产64G超大显存GPU,海光K100
长城永不倒,国货当自强! 海光K100 AI是7nm国产GPU加速卡,主打大显存高AI算力信创国产适配高性价比: • 64GB大显存,适合大模型训练/推理 • INT8 392 TOPS、FP16 196 TFLOPS,算力强劲 • PCIe 5.0、350W&am…...
Kali 2023最新版安装Fluxion避坑指南:从git clone到镜像源全流程
Kali 2023最新版安装Fluxion避坑指南:从git clone到镜像源全流程 如果你正在学习网络安全渗透测试,Fluxion绝对是一个值得掌握的Wi-Fi安全审计工具。作为Kali Linux生态中最受欢迎的无线网络测试套件之一,它通过智能化的交互界面让复杂的攻击…...
零基础玩转OpenClaw:借助GLM-4.7-Flash实现首个自动化脚本
零基础玩转OpenClaw:借助GLM-4.7-Flash实现首个自动化脚本 1. 为什么选择OpenClaw作为个人自动化助手 去年夏天,当我第三次因为忘记定时发送周报而被领导提醒时,终于下定决心寻找一个能24小时待命的数字助手。在尝试了各种RPA工具后&#x…...
Go语言依赖管理:从GOPATH到Go Modules
Go语言依赖管理:从GOPATH到Go Modules 作为一个写了十几年代码的Go后端老兵,我经历了Go语言依赖管理的从GOPATH到Go Modules的转变,踩了不少坑。今天就来分享一下Go语言依赖管理的实践经验。 一、依赖管理的演进 1. GOPATH时代 在Go 1.11之前…...
别再只盯着标定板了!用ROS camera_calibration搞定海康工业相机,这5个细节决定成败
工业相机标定进阶指南:ROS camera_calibration的五个关键优化点 工业相机的标定质量直接决定了机器视觉系统的测量精度。许多开发者虽然能够完成基础标定流程,却常常在参数解读和精度优化环节遇到瓶颈。本文将深入解析ROS camera_calibration工具在实际工…...
