当前位置:网站首页>QT compilation error: unknown module (s) in qt: script

QT compilation error: unknown module (s) in qt: script

2022-06-26 03:13:00 Pepsi__

When cross compiling , Used in projects script An error occurred while the module

QT		+= script
ERROR: Unknown module(s) in QT: script

terms of settlement : Compile it yourself qtscript library
To qt Download from the official website qtscript Source code :https://download.qt.io/archive/qt/
Find yourself qt edition , my qt The version is 5.9.6, Enter into submodules Under the table of contents , download qtscript-opensource-src-5.9.6.zip file
 Insert picture description here
Unzip after download
To the unzipped source directory , take include Copy to all folders qt Installation directory qt edition / compiler / Under the table of contents . my qt The installation directory is /opt/Qt5.9.6/, So copy it in /opt/Qt5.9.6/5.9.6/gcc_64 Under the table of contents
 Insert picture description here
Put the... In the source directory src The folder is also copied in qt Installation directory qt edition / compiler / Under the table of contents .
 Please add a picture description
Find the project file in the source code .pro. use qt open , And compile , After compilation , Will be generated in the compilation directory qt5script library
 Insert picture description here
In use of qtscript In the project of the module , Right click , Add library
 Insert picture description here
Select the compiled Library libQt5Script.so
 Insert picture description here
Click on next, complete
 Insert picture description here
After the library is added , In the use of QScriptEngine Make the following changes to the header file
 Insert picture description here
There is no need to add... To the project QT += script
 Insert picture description here

原网站

版权声明
本文为[Pepsi__]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/177/202206260239187811.html