4
votes

I want to build Qt 5.12.4 on Windows 10 to have qtwebengine with proprietary codec for x86 applications but I get the 64-bit cross-building or native toolchain is required error as follows by running qmake .\qtwebengine -- -webengine-proprietary-codecs command.

qmake webengine with proprietary codecs Before running qmake command, I do the following steps:

  1. Run Windows command prompt as Administrator. change directory to

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build

and run the following script:

vcvarsall.bat amd64_x86

I run this command because I want to build Qt WebEngine for x86 applications.

  1. Change directory to

D:\Qt\Qt5.12.4\5.12.4\Src

and run the below command:

configure -webengine-proprietary-codecs

After this configuration setting, I got this result: enter image description here

I installed these Qt webengine compile prerequisites:

-Python 2.7.15

-Bison, Flex from here

-GPerf(32bit) from here

-ActivePerl(64bit) from here

-LLVM(64bit) from here

-Visual Studio 2017

-Windows 10 SDK

I also add them to Windows path and restart my machine.

Besides, I also install MSVC 2015 64-bit, MSVC 2017 32-bit, MSVC 2017 64-bit, Sources, Qt WebEngine, and Qt Network Authorization components.

1

1 Answers

0
votes

For windows I compiled qtwebengine with proprietary codecs using a bat file.

create qt5vars.bat. Paste below lines. Put this file in D:\Qt\Qt5.12.4\5.12.4\Src folder.

@echo off

REM Set up \Microsoft Visual Studio 2015, where <arch> is \c amd64, \c x86, etc.
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsall.bat" amd64_x86

REM Edit this location to point to the source code of Qt
SET _ROOT=D:\Qt\Qt5.12.4\5.12.4\Src

SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%

SET _ROOT=

REM Keeps the command line open when this script is run.
cmd /k

Run the bat file.

Note: for qtwebengine compilation you need to enable the long path name support otherwise compilation may fail. To enable it use below link: https://superuser.com/questions/1119883/windows-10-enable-ntfs-long-paths-policy-option-missing