Forum Updated on Feb 6th
This topic has been deleted. Only users with topic management privileges can see it.
-
I have build Qt from source and now I am trying to build Qt Creator from source and get the following error:
Project ERROR: Unknown module(s) in QT: script
. I found a similar thread that suggested building qtscript libraty by runningmake module-qtscript
manually. I did that from the Qt source folder and the build for the script library finished without any errors. However, I still get the same error when I try to prepare Qt Creator for build:$ qmake -r ../qt-creator/qtcreator.pro Reading /home/aras/Projects/qt-creator/src/src.pro [/home/aras/Projects/qt-creator-build/src] Reading /home/aras/Projects/qt-creator/src/shared/qbs/src/lib/corelib/corelib.pro [/home/aras/Projects/qt-creator-build/src/shared/qbs/src/lib/corelib] Project ERROR: Unknown module(s) in QT: script
Locating
libQt5Script.so
finds it in my Qt source directory but not installed anywhere else on the system:$ locate libQt5Script.so /home/aras/Projects/qt-everywhere-opensource-src-5.7.0/qtbase/lib/libQt5Script.so /home/aras/Projects/qt-everywhere-opensource-src-5.7.0/qtbase/lib/libQt5Script.so.5 /home/aras/Projects/qt-everywhere-opensource-src-5.7.0/qtbase/lib/libQt5Script.so.5.7 /home/aras/Projects/qt-everywhere-opensource-src-5.7.0/qtbase/lib/libQt5Script.so.5.7.0
Here is my Qt version:
$ qmake -v QMake version 3.0 Using Qt version 5.7.0 in /usr/local/Qt-5.7.0/lib
I am following this guide. What else do I need to do to get past this error and build Qt Creator?
-
Hi,
Did you call
make install
after you built the QtScript module ? -
@SGaist yes I ran
sudo make install module-qtscript
I also just tried doing a fresh build of qt from source using external build directory. I still get the same error -
Ok, then, did you re-run qmake after you installed qtscript ?
-
@SGaist let me back track a bit. The first time I tried this I ran
sudo make install module-qscript
and once that was over I went back to my qt creator build directory and tried configuring the project again and I got this error::~/Projects/qt-creator-build$ qmake -r ../qt-creator/qtcreator.pro Reading /home/aras/Projects/qt-creator/src/src.pro [/home/aras/Projects/qt-creator-build/src] Reading /home/aras/Projects/qt-creator/src/shared/qbs/src/lib/corelib/corelib.pro [/home/aras/Projects/qt-creator-build/src/shared/qbs/src/lib/corelib] Project ERROR: Unknown module(s) in QT: script
Now I removed my old qt source folder and downloaded a new one and built it from scratch again. Then I build the qscript module without error. However, just now I tried installing it using
sudo make install module-qtscript
and after some time I got this new error:/home/aras/Projects/qt-everywhere-opensource-src-5.7.0/qtwayland/src/shared/qwaylandinputmethodeventbuilder.cpp /home/aras/Projects/qt-everywhere-opensource-src-5.7.0/qtwayland/src/shared/qwaylandinputmethodeventbuilder.cpp:46:80: fatal error: QtWaylandCompositor/private/qwayland-server-text-input-unstable-v2.h: No such file or directory compilation terminated. Makefile:8100: recipe for target '.obj/qwaylandinputmethodeventbuilder.o' failed make[3]: *** [.obj/qwaylandinputmethodeventbuilder.o] Error 1 make[3]: Leaving directory '/home/aras/Projects/shared-build-qt5.7.0/qtwayland/src/compositor' Makefile:83: recipe for target 'sub-compositor-install_subtargets' failed make[2]: *** [sub-compositor-install_subtargets] Error 2 make[2]: Leaving directory '/home/aras/Projects/shared-build-qt5.7.0/qtwayland/src' Makefile:56: recipe for target 'sub-src-install_subtargets' failed make[1]: *** [sub-src-install_subtargets] Error 2 make[1]: Leaving directory '/home/aras/Projects/shared-build-qt5.7.0/qtwayland' Makefile:497: recipe for target 'module-qtwayland-install_subtargets' failed make: *** [module-qtwayland-install_subtargets] Error 2
The build is really not cooperating with me. Do you have any suggestions?
-
Did you do a complete build before qtscript ?
On a side note, if you want to avoid having to uncompress the sources each time. Just do an out of source build.
-
@SGaist yes as far as I know, I did a complete build. In my last build after I deleted the initial source folder, I did an out of source build as someone else had also recommended that to me.
I still am not able to install the qtscript module. What do you think I might be missing?
-
Check the size of the library files created and try to build a dummy project using the QtScript module.
-
@SGaist here is a list of library files in my build folder (since they are not installed yet):
$ ls -sl /home/aras/Projects/shared-build-qt5.7.0/qtscript/lib/ total 4072 4 drwxrwxr-x 4 aras aras 4096 Aug 16 14:11 cmake 4 -rw-rw-r-- 1 aras aras 716 Aug 16 14:10 libQt5Script.la 4 -rw-rw-r-- 1 aras aras 1206 Aug 16 14:10 libQt5Script.prl 0 lrwxrwxrwx 1 aras aras 21 Aug 16 14:11 libQt5Script.so -> libQt5Script.so.5.7.0 0 lrwxrwxrwx 1 aras aras 21 Aug 16 14:11 libQt5Script.so.5 -> libQt5Script.so.5.7.0 0 lrwxrwxrwx 1 aras aras 21 Aug 16 14:11 libQt5Script.so.5.7 -> libQt5Script.so.5.7.0 2912 -rwxrwxr-x 1 aras aras 2979368 Aug 16 14:11 libQt5Script.so.5.7.0 4 -rw-rw-r-- 1 aras aras 751 Aug 16 14:11 libQt5ScriptTools.la 4 -rw-rw-r-- 1 aras aras 1221 Aug 16 14:11 libQt5ScriptTools.prl 0 lrwxrwxrwx 1 aras aras 26 Aug 16 14:11 libQt5ScriptTools.so -> libQt5ScriptTools.so.5.7.0 0 lrwxrwxrwx 1 aras aras 26 Aug 16 14:11 libQt5ScriptTools.so.5 -> libQt5ScriptTools.so.5.7.0 0 lrwxrwxrwx 1 aras aras 26 Aug 16 14:11 libQt5ScriptTools.so.5.7 -> libQt5ScriptTools.so.5.7.0 1136 -rwxrwxr-x 1 aras aras 1162304 Aug 16 14:11 libQt5ScriptTools.so.5.7.0 4 drwxrwxr-x 2 aras aras 4096 Aug 16 14:11 pkgconfig
Can you explain more how I make a dummy project to test the lib? Remember I am trying to build Qt Creator, so I don’t have it yet. Should I just make a simple C++ file and try to build it in command line with qcc? Or do I need to configure it with qmake?
-
You can either use your distribution provided Qt Creator or the one from the installer.
Or just build one of QtScript examples.
-
@SGaist I rather not install the distro provided qt. I did that on another machine and it gets pretty confusing with multiple versions of Qt installed in parallel. I see if I can find a QtScript example, is there one that you know?
Edit: I found a bunch of script example projects in
~/Projects/qt-everywhere-opensource-src-5.7.0/qtscript/examples/script
. The readme refers to docs, so I do not know how to build them yet, but will try to find out. But I tried just runningqmake
in one of the example folders and I get this error:.../examples/script/calculator$ qmake Info: creating stash file /home/aras/Projects/qt-everywhere-opensource-src-5.7.0/qtscript/.qmake.stash Project ERROR: Unknown module(s) in QT: script uitools
-
Did you call make install after you built the module ?
-
I don’t think I ran
make install
becauseqmake
gave me that error above. Usually it says to run install if there are no errors.I have since installed the binary distribution of Qt so that I am not blocked by this. But I still would like to learn how to do a full install of
Qt
andQt Creator
from source. -
Looks like you built the qtscript module successfully, that’s why I’m asking whether you ran
make install
before trying to build the example.
If you need to install the webkit* Windows library for Qt 5.7 you should compile it manually because in new version webkit (WebView?) replaced by WebEngine.
Read about Qt 5.7 release (comments): http://blog.qt.io/blog/2016/06/16/qt-5-7-released/
Build sequence (static OR shared):
1) Download Qt 5.7.0 sources: http://download.qt.io/community_releases/5.7/5.7.0/
2) Download required tools: ActiveState Perl (binary), Python (binary), Ruby (binary), GnuWin Bison (binary), GPref (binary), Grep (binary), WinFlex, LibIconv, make (binary), sqlite (source!), ICU (source), windows msys (binary) (unix like shell with the tools), mingw-w64 (bin+dev) for build Qt with QtWebKit, see link on: https://trac.webkit.org/wiki/BuildingQtOnWindows
3) After download ICU source into C:icuicu. Open msys QT mingw console shell by open Start windows menu (msys should be downloaded and installed) and search or use fast search. In opened console start configure script and then compile and install:
$ cd C:icuicusource
$ ./runConfigureICU
$ set PATH=%PATH%;C:msys1.0bin
$ make.exe
$ make.exe install
4) Build Qt with(!) ICU support (set «-icu» to configure) see compile script below. Change PATH to your environment.
Directory structure:
- C:Qt5.7.0 — download binary version of Qt 5.7.0 here
- C:Qt5.7.0n — directory for new (compiled) version of 5.7.0 (just make dir)
- C:QtSrc — download source of Qt 5.7.0 here
C:QtSrcqtbasecompile.bat
set INCLUDE=C:icuicudistinclude
set LIB=C:icuicudistlib
set QTDIR=C:Qt5.7.0n
set PATH=%PATH%;C:QtQt5.7.05.7mingw53_32bin;C:QtQt5.7.0ToolsQtCreatorbin;C:QtQt5.7.0Toolsmingw530_32bin;C:QtSrcqtbasebin;C:Program Files (X86)GnuWin32bin;C:winflex;C:Ruby23-x64bin;C:Python27;C:mingw-w64i686-1mingw32bin;C:icubin
set QMAKESPEC=win32-g++
set BUILD_DIR=C:QtQt5.7.0n
call C:QtSrcqtbaseconfigure.bat -prefix %BUILD_DIR% -platform %QMAKESPEC% -confirm-license -debug-and-release -opensource -opengl desktop -no-compile-examples -icu -I C:/icu/icu/dist/include -L C:/icu/icu/dist/lib
jom.exe -j 4
pause
Run command in exmaple in Windows Power Shell:
$ cd C:QtSrcqtbase
$ ./compile.bat
After pass through compile use it to install files in the BUILD_DIR (install Qt files):
$ C:mingw-w64i686-1mingw32binmingw32-make.exe install
Qt should start to install
5) Download Qtwebkit sources to C:QtSrcqtwebkit. Use compile script below to compile the qtwebkit using new Qt 5.7.0 build with files in C:Qt5.7.0n with ICU.
C:QtSrcqtwebkitToolsScriptscompile.bat
set INCLUDE=C:sqlite
set LIBS=C:sqlite
set SQLITE3SRCDIR=C:sqlite
set QTDIR=C:QtQt5.7.0n
set PATH=%PATH%;C:QtQt5.7.0nbin;C:QtSrcqtbasebin;C:winflex;C:Ruby23-x64bin;C:Python27;C:mingw-w64i686-1mingw32bin;C:icubin;C:Program Files (x86)GnuWin32bin
set QMAKESPEC=win32-g++
call perl.exe .build-webkit --qt --release
Compile the qtwebkit:
$ cd C:QtSrcqtwebkitToolsScripts
$ ./compile.bat
$ cd C:QtSrcqtwebkitWebKitBuildRelease
$ C:mingw-w64i686-1mingw32binmingw32-make.exe install
It should be possible to compile your application with the qtwebkit after successfull compile and install.
BUILD QT FOR STATIC
Edit file C:QtSrcqtbasecompile.bat and pass through build.
...
call C:QtSrcqtbaseconfigure.bat -prefix %BUILD_DIR% -platform %QMAKESPEC% -confirm-license -debug-and-release -opensource -opengl desktop -static -no-compile-examples -icu
echo "QMAKE_FLAGS += -static -static-libgcc" >> .mkspecs/%QMAKESPEC%/qmake.conf
...
POSSIBLE ERRORS
1) While build qtwebkit: "fatal error: unicode/uchar.h: No such file or directory"
Check that your Qt 5.7.0n build with ICU. IT also could notify you about «ICU required» at configure in qtwebkit.
2) flex: unknown flag '-'. For usage, try
You should use correct version of Flex that is «win_flex» in this case. You should rename files to use win_flex instead of just flex (and bison).
1) rename C:Program Files (x86)GnuWin32binflex.exe to some unused name.
2) rename C:Program Files (x86)GnuWin32binbison.exe to some unused name.
3) rename C:winflexwin_bison.exe to bison.exe.
3) While build qtwebkit: "fatal error: sqlite3.h: No such file or directory"
Edit file C:QtSrcqtwebkitToolsScriptscompile.bat and check for correct path to sqlite:
set SQLITE3SRCDIR=C:(path to some SQLITE .h/source files)
4) skipping incompatible ... when searching for ...
You should download right library arch (32bit or 64bit)
5) View.cpp ... undefined reference to WKPageCanGoBack
Could happens when pass through some test or MiniBrowser. You can search in files for the «UIProcess/API/qt» and «MiniBroswer» and remove it from
Makefile’s and some other files and then start build again.
LINKS
Build Qt5: https://wiki.qt.io/Building_Qt_5_from_Git Qt WebKit build
like how to: https://trac.webkit.org/wiki/BuildingQtOnWindows ICU
build with GNU: https://wiki.qt.io/Compiling-ICU-with-MinGW
7 / 7 / 0 Регистрация: 08.10.2015 Сообщений: 126 |
|
1 |
|
16.07.2016, 19:10. Показов 14577. Ответов 14
Доброго времени суток. При переходе на компилятор 5.6, 5.7 последние матерятся что не знаю что такое модули webkit и webkitwidgets, хотя у 5.5 всё хорошо запускается. Их переименовали в более новых версиях ?
__________________
0 |
Programming Эксперт 94731 / 64177 / 26122 Регистрация: 12.04.2006 Сообщений: 116,782 |
16.07.2016, 19:10 |
Ответы с готовыми решениями: Unknown module(s) in QT: webkitwidgets webkit Project ERROR: Unknown module(s) in QT: webkitwidgets Вот пытаюсь использовать QWebView, но ловлю такую ошибку: QtCreator, ошибка: Unknown module(s) in QT: KXmlGui Начало здесь Без QtCreator, с терминала компилируется qmake,… Не собирается, не запускается. Ошибка: Unknown module(s) in QT: phonon 14 |
1067 / 649 / 229 Регистрация: 14.01.2016 Сообщений: 2,031 Записей в блоге: 9 |
|
16.07.2016, 21:56 |
2 |
Решение
Их переименовали в более новых версиях ? Нет, их удалили. Они давно были deprecated. https://wiki.qt.io/New_Features_in_Qt_5.6
1 |
7 / 7 / 0 Регистрация: 08.10.2015 Сообщений: 126 |
|
16.07.2016, 22:36 [ТС] |
3 |
Нет, их удалили Ага, спасибо. Тогда такой вопрос. Чем заменить ? У меня на QWebView колонка новости. Грузит html с серва. Добавлено через 6 минут
0 |
1442 / 1323 / 131 Регистрация: 20.03.2009 Сообщений: 4,689 Записей в блоге: 11 |
|
16.07.2016, 22:40 |
5 |
Qt WebEngine, он на базе хрома.
0 |
Wolf_Lone 7 / 7 / 0 Регистрация: 08.10.2015 Сообщений: 126 |
||||
16.07.2016, 22:57 [ТС] |
6 |
|||
Qt WebEngine, он на базе хрома. Да, это я понял. Не понял лишь вот что. Это приват плюшки или нет ? Пытаюсь подключить
ругается Добавлено через 1 минуту
И т.д. и т.п. Сам сильно в этом не шарю. Если надо — создавай тему с вопросом по конкретному портированию. Понял, спасибо
0 |
Pied Piper 236 / 227 / 57 Регистрация: 15.01.2013 Сообщений: 855 |
|
18.07.2016, 12:20 |
8 |
annulen, вы уже пробовали? Я как-то сам собирал из последних сорсов веб кит — иногда приложение просто крашилось.
0 |
0 / 0 / 0 Регистрация: 18.07.2016 Сообщений: 4 |
|||||
18.07.2016, 19:36 |
9 |
||||
annulen, вы уже пробовали? Я как-то сам собирал из последних сорсов веб кит — иногда приложение просто крашилось. Вообще я разработчик
0 |
7 / 7 / 0 Регистрация: 08.10.2015 Сообщений: 126 |
|
18.07.2016, 20:19 [ТС] |
10 |
можно ничего не портировать, а взять новую версию WebKit признан устаревшим или это нет так ? Если устарел зачем собирать старую вещь если есть более новый аналог.
0 |
0 / 0 / 0 Регистрация: 18.07.2016 Сообщений: 4 |
|
18.07.2016, 20:34 |
11 |
Вещь 2016 года — это старая вешь? А как у вас там в будущем, хорошо живется?
0 |
1442 / 1323 / 131 Регистрация: 20.03.2009 Сообщений: 4,689 Записей в блоге: 11 |
|
18.07.2016, 21:40 |
12 |
Вещь 2016 года — это старая вешь? Дата последнего комита не говорит новая это вещь или нет.
0 |
0 / 0 / 0 Регистрация: 18.07.2016 Сообщений: 4 |
|
18.07.2016, 21:47 |
13 |
А что тогда говорит? Поддержка ES6, например, говорит?
0 |
Wyn |
|||||
18.07.2016, 22:17
|
|||||
0 |
7 / 7 / 0 Регистрация: 08.10.2015 Сообщений: 126 |
|
19.07.2016, 20:08 [ТС] |
15 |
Wyn, закрой пожалуйста тему, на вопрос ответ получен. Заранее спасибо
0 |
neosapient1
Новичок Сообщений: 10 |
Здравствуйте. Хочу поработать с модулем построения графиков Qt Charts. Создаю новый проект. QT += charts core gui то получаю ошибку Project ERROR: Unknown module(s) in QT: charts Как заставить увидеть Qt Charts? Спасибо. |
||
|
kambala |
может она установилась под какую-то конкретную версию Qt? у тебя их вон 3. |
||
Изучением C++ вымощена дорога в Qt. UTF-8 has been around since 1993 and Unicode 2.0 since 1996; if you have created any 8-bit character content since 1996 in anything other than UTF-8, then I hate you. © Matt Gallagher |
neosapient1
Новичок Сообщений: 10 |
Галки выставлены так, как указано на прикрепленной картинке. |
||
|
kambala |
речь не о галках, там особо нечем управлять. поищи в каких из папок появился модуль. если лишь в одной — тогда проблема ясна. |
||
Изучением C++ вымощена дорога в Qt. UTF-8 has been around since 1993 and Unicode 2.0 since 1996; if you have created any 8-bit character content since 1996 in anything other than UTF-8, then I hate you. © Matt Gallagher |
neosapient1
Новичок Сообщений: 10 |
Я не знаю, как этот модуль должен выглядеть. Смотрел в папке C:Qt5.15.2msvc2015_64bin (и ей подобным ‘msvc2019’ и ‘msvc2019_64’). Там нет библиотек вида Qt5Cahrts.dll (или что там должно быть?) P.S. |
||
|
neosapient1
Новичок Сообщений: 10 |
В итоге поборол сборку файлов Qt5Charts.dll и Qt5Chartsd.dll из исходников. P.S. |
||
|
PimenS
Крякер Сообщений: 363 |
Галки выставлены так, как указано на прикрепленной картинке. Просто нужно было галку Qt Charts выставлять в той ветке для которой уже установлены пакеты. |
||
|
neosapient1
Новичок Сообщений: 10 |
Просто нужно было галку Qt Charts выставлять в той ветке для которой уже установлены пакеты. Ох, проглядел. Есть такая галка. |
||
|
Click here follow the steps to fix Project Error Unknown Module S In Qt Vector and related errors.
|
|
To Fix (Project Error Unknown Module S In Qt Vector) error you need to |
|
Step 1: |
|
---|---|
Download (Project Error Unknown Module S In Qt Vector) Repair Tool |
|
Step 2: |
|
Click the «Scan» button | |
Step 3: |
|
Click ‘Fix All‘ and you’re done! | |
Compatibility:
Limitations: |
Project Error Unknown Module S In Qt Vector Error Codes are caused in one way or another by misconfigured system files
in your windows operating system.
If you have Project Error Unknown Module S In Qt Vector errors then we strongly recommend that you
Download (Project Error Unknown Module S In Qt Vector) Repair Tool.
This article contains information that shows you how to fix
Project Error Unknown Module S In Qt Vector
both
(manually) and (automatically) , In addition, this article will help you troubleshoot some common error messages related to Project Error Unknown Module S In Qt Vector error code that you may receive.
Note:
This article was updated on 2023-02-04 and previously published under WIKI_Q210794
Contents
- 1. What is Project Error Unknown Module S In Qt Vector error?
- 2. What causes Project Error Unknown Module S In Qt Vector error?
- 3. How to easily fix Project Error Unknown Module S In Qt Vector errors
What is Project Error Unknown Module S In Qt Vector error?
The Project Error Unknown Module S In Qt Vector error is the Hexadecimal format of the error caused. This is common error code format used by windows and other windows compatible software and driver vendors.
This code is used by the vendor to identify the error caused. This Project Error Unknown Module S In Qt Vector error code has a numeric error number and a technical description. In some cases the error may have more parameters in Project Error Unknown Module S In Qt Vector format .This additional hexadecimal code are the address of the memory locations where the instruction(s) was loaded at the time of the error.
What causes Project Error Unknown Module S In Qt Vector error?
The Project Error Unknown Module S In Qt Vector error may be caused by windows system files damage. The corrupted system files entries can be a real threat to the well being of your computer.
There can be many events which may have resulted in the system files errors. An incomplete installation, an incomplete uninstall, improper deletion of applications or hardware. It can also be caused if your computer is recovered from a virus or adware/spyware
attack or by an improper shutdown of the computer. All the above actives
may result in the deletion or corruption of the entries in the windows
system files. This corrupted system file will lead to the missing and wrongly
linked information and files needed for the proper working of the
application.
How to easily fix Project Error Unknown Module S In Qt Vector error?
There are two (2) ways to fix Project Error Unknown Module S In Qt Vector Error:
Advanced Computer User Solution (manual update):
1) Start your computer and log on as an administrator.
2) Click the Start button then select All Programs, Accessories, System Tools, and then click System Restore.
3) In the new window, select «Restore my computer to an earlier time» option and then click Next.
4) Select the most recent system restore point from the «On this list, click a restore point» list, and then click Next.
5) Click Next on the confirmation window.
6) Restarts the computer when the restoration is finished.
Novice Computer User Solution (completely automated):
1) Download (Project Error Unknown Module S In Qt Vector) repair utility.
2) Install program and click Scan button.
3) Click the Fix Errors button when scan is completed.
4) Restart your computer.
How does it work?
This tool will scan and diagnose, then repairs, your PC with patent
pending technology that fix your windows operating system registry
structure.
basic features: (repairs system freezing and rebooting issues , start-up customization , browser helper object management , program removal management , live updates , windows structure repair.)
You need to install the webkitwidgets library.
On Ubuntu, try this in a terminal:
sudo apt-get install libqt5webkit5-dev
If you need to install the webkit* Windows library for Qt 5.7 you should compile it manually because in new version webkit (WebView?) replaced by WebEngine.
Read about Qt 5.7 release (comments): http://blog.qt.io/blog/2016/06/16/qt-5-7-released/
Build sequence (static OR shared):
1) Download Qt 5.7.0 sources: http://download.qt.io/community_releases/5.7/5.7.0/
2) Download required tools: ActiveState Perl (binary), Python (binary), Ruby (binary), GnuWin Bison (binary), GPref (binary), Grep (binary), WinFlex, LibIconv, make (binary), sqlite (source!), ICU (source), windows msys (binary) (unix like shell with the tools), mingw-w64 (bin+dev) for build Qt with QtWebKit, see link on: https://trac.webkit.org/wiki/BuildingQtOnWindows
3) After download ICU source into C:icuicu. Open msys QT mingw console shell by open Start windows menu (msys should be downloaded and installed) and search or use fast search. In opened console start configure script and then compile and install:
$ cd C:icuicusource
$ ./runConfigureICU
$ set PATH=%PATH%;C:msys1.0bin
$ make.exe
$ make.exe install
4) Build Qt with(!) ICU support (set «-icu» to configure) see compile script below. Change PATH to your environment.
Directory structure:
- C:Qt5.7.0 — download binary version of Qt 5.7.0 here
- C:Qt5.7.0n — directory for new (compiled) version of 5.7.0 (just make dir)
- C:QtSrc — download source of Qt 5.7.0 here
C:QtSrcqtbasecompile.bat
set INCLUDE=C:icuicudistinclude
set LIB=C:icuicudistlib
set QTDIR=C:Qt5.7.0n
set PATH=%PATH%;C:QtQt5.7.05.7mingw53_32bin;C:QtQt5.7.0ToolsQtCreatorbin;C:QtQt5.7.0Toolsmingw530_32bin;C:QtSrcqtbasebin;C:Program Files (X86)GnuWin32bin;C:winflex;C:Ruby23-x64bin;C:Python27;C:mingw-w64i686-1mingw32bin;C:icubin
set QMAKESPEC=win32-g++
set BUILD_DIR=C:QtQt5.7.0n
call C:QtSrcqtbaseconfigure.bat -prefix %BUILD_DIR% -platform %QMAKESPEC% -confirm-license -debug-and-release -opensource -opengl desktop -no-compile-examples -icu -I C:/icu/icu/dist/include -L C:/icu/icu/dist/lib
jom.exe -j 4
pause
Run command in exmaple in Windows Power Shell:
$ cd C:QtSrcqtbase
$ ./compile.bat
After pass through compile use it to install files in the BUILD_DIR (install Qt files):
$ C:mingw-w64i686-1mingw32binmingw32-make.exe install
Qt should start to install
5) Download Qtwebkit sources to C:QtSrcqtwebkit. Use compile script below to compile the qtwebkit using new Qt 5.7.0 build with files in C:Qt5.7.0n with ICU.
C:QtSrcqtwebkitToolsScriptscompile.bat
set INCLUDE=C:sqlite
set LIBS=C:sqlite
set SQLITE3SRCDIR=C:sqlite
set QTDIR=C:QtQt5.7.0n
set PATH=%PATH%;C:QtQt5.7.0nbin;C:QtSrcqtbasebin;C:winflex;C:Ruby23-x64bin;C:Python27;C:mingw-w64i686-1mingw32bin;C:icubin;C:Program Files (x86)GnuWin32bin
set QMAKESPEC=win32-g++
call perl.exe .build-webkit --qt --release
Compile the qtwebkit:
$ cd C:QtSrcqtwebkitToolsScripts
$ ./compile.bat
$ cd C:QtSrcqtwebkitWebKitBuildRelease
$ C:mingw-w64i686-1mingw32binmingw32-make.exe install
It should be possible to compile your application with the qtwebkit after successfull compile and install.
BUILD QT FOR STATIC
Edit file C:QtSrcqtbasecompile.bat and pass through build.
...
call C:QtSrcqtbaseconfigure.bat -prefix %BUILD_DIR% -platform %QMAKESPEC% -confirm-license -debug-and-release -opensource -opengl desktop -static -no-compile-examples -icu
echo "QMAKE_FLAGS += -static -static-libgcc" >> .mkspecs/%QMAKESPEC%/qmake.conf
...
POSSIBLE ERRORS
1) While build qtwebkit: "fatal error: unicode/uchar.h: No such file or directory"
Check that your Qt 5.7.0n build with ICU. IT also could notify you about «ICU required» at configure in qtwebkit.
2) flex: unknown flag '-'. For usage, try
You should use correct version of Flex that is «win_flex» in this case. You should rename files to use win_flex instead of just flex (and bison).
1) rename C:Program Files (x86)GnuWin32binflex.exe to some unused name.
2) rename C:Program Files (x86)GnuWin32binbison.exe to some unused name.
3) rename C:winflexwin_bison.exe to bison.exe.
3) While build qtwebkit: "fatal error: sqlite3.h: No such file or directory"
Edit file C:QtSrcqtwebkitToolsScriptscompile.bat and check for correct path to sqlite:
set SQLITE3SRCDIR=C:(path to some SQLITE .h/source files)
4) skipping incompatible ... when searching for ...
You should download right library arch (32bit or 64bit)
5) View.cpp ... undefined reference to WKPageCanGoBack
Could happens when pass through some test or MiniBrowser. You can search in files for the «UIProcess/API/qt» and «MiniBroswer» and remove it from
Makefile’s and some other files and then start build again.
LINKS
Build Qt5: https://wiki.qt.io/Building_Qt_5_from_Git Qt WebKit build
like how to: https://trac.webkit.org/wiki/BuildingQtOnWindows ICU
build with GNU: https://wiki.qt.io/Compiling-ICU-with-MinGW
The community builds referenced by Alex are only available until Qt 5.9.
If you want to use newer Qt5 (current version is 5.11), then another option is to port «QtWebKit» to «QtWebEngine».
See: https://wiki.qt.io/QtWebEngine/Porting_from_QtWebKit