当前位置:网站首页>Qt编译出错ERROR: Unknown module(s) in QT: script
Qt编译出错ERROR: Unknown module(s) in QT: script
2022-06-26 02:39:00 【百口可乐__】
在进行交叉编译时,在项目中使用script模块时出现错误
QT += script
ERROR: Unknown module(s) in QT: script
解决办法:自己编译qtscript库
到qt官网下载qtscript源代码:https://download.qt.io/archive/qt/
找到自己qt版本,我的qt版本是5.9.6,进入到submodules目录下,下载qtscript-opensource-src-5.9.6.zip文件
下载完成后解压
到解压后的源码目录,将include文件夹全部拷贝到qt安装目录的qt版本/编译器/目录下。我的qt安装目录是/opt/Qt5.9.6/,因此将其拷贝在/opt/Qt5.9.6/5.9.6/gcc_64目录下
将源码目录下的src文件夹同样拷贝在qt安装目录的qt版本/编译器/目录下。
在源码中找到项目文件.pro。用qt打开,并进行编译,编译完成后,会在编译目录生成qt5script库
在使用到qtscript模块的项目中,右键,添加库
选择编译好的库libQt5Script.so
点击next,完成
库添加好后,在用到QScriptEngine头文件的地方做如下修改
项目中不再需要加入QT += script
边栏推荐
- Leetcode 176 The second highest salary (June 25, 2022)
- Teach you to quickly record sounds on PC web pages as audio files
- Camtasia 2022全新版超清录制电脑视频
- Analysis and optimization of ue5 global illumination system lumen
- ArrayList # sublist these four holes, you get caught accidentally
- 2021-08-04
- P2483-[模板]k短路/[SDOI2010]魔法猪学院【主席树,堆】
- [solution] the blue screen restart problem of the virtual machine started by the VMware of Lenovo Savior
- OpenAPI 3.0 specification - Food Guide
- OpenAPI 3.0 规范-食用指南
猜你喜欢
随机推荐
Use annotationdbi to convert gene names in R
Redis configuration and optimization of NoSQL
Multi surveyor Gongshu campus Xiao sir_ Page error in Jenkins
[QT] custom control - switch
[machine learning] case study of college entrance examination prediction based on multiple time series
如何提词条
Additional: brief description of hikaricp connection pool; (I didn't go deep into it, but I had a basic understanding of hikaricp connection pool)
喜讯 | 祝贺Apache Linkis(incubating) 社区新增5位Committer
MySQL根据查询的数据更新记录
ORB-SLAM3论文概述
Dual batteries in series, hardware design
Teach you to quickly record sounds on PC web pages as audio files
How to add a table to a drawing in ggplot2
Audio video and CPU architecture
Classic quotations from "human nature you must not know"
业务流程图设计
工作室第3次HarmonyOS培训笔记
如何在 ggplot2 中删除网格线(附示例)
Literature reading --- optimize RNA SEQ research to study herbicide resistance (review)
Camtasia 2022 new ultra clear recording computer video