【问题标题】:Building qtwebengine of Qt 5.12.4 on msvc2017 to enable proprietary codecs在 msvc2017 上构建 Qt 5.12.4 的 qtwebengine 以启用专有编解码器
【发布时间】:2019-11-17 21:33:20
【问题描述】:

我想在 Windows 10 上构建 Qt 5.12.4 以使 qtwebengine 具有适用于 x86 应用程序的专有编解码器,但我通过运行 qmake .\qtwebengine -- -webengine-proprietary-codecs 命令得到64-bit cross-building or native toolchain is required 错误,如下所示。

在运行 qmake 命令之前,我执行以下步骤:

  1. 以管理员身份运行 Windows 命令提示符。将目录更改为

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

并运行以下脚本:

vcvarsall.bat amd64_x86

我运行此命令是因为 我想为 x86 应用程序构建 Qt WebEngine。

  1. 将目录更改为

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

并运行以下命令:

配置-webengine-专有编解码器

在这个配置设置之后,我得到了这个结果:

我安装了这些 Qt webengine 编译先决条件:

-Python 2.7.15

-Bison,来自here的Flex

-GPerf(32bit) 来自here

-ActivePerl(64bit) from here

-LLVM(64bit) 来自here

-Visual Studio 2017

-Windows 10 SDK

我还将它们添加到 Windows 路径并重新启动我的机器。

此外,我还安装了 MSVC 2015 64 位、MSVC 2017 32 位、MSVC 2017 64 位、Sources、Qt WebEngine 和 Qt 网络授权组件。

【问题讨论】:

    标签: qt qt5 codec toolchain qtwebengine


    【解决方案1】:

    对于 Windows,我使用 bat 文件使用专有编解码器编译了 qtwebengine。

    创建 qt5vars.bat。粘贴以下行。将此文件放入 D:\Qt\Qt5.12.4\5.12.4\Src 文件夹中。

    @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
    

    运行 bat 文件。

    注意:qtwebengine编译需要开启长路径名支持,否则编译可能会失败。要启用它,请使用以下链接: https://superuser.com/questions/1119883/windows-10-enable-ntfs-long-paths-policy-option-missing

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-20
      • 1970-01-01
      • 1970-01-01
      • 2015-07-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多