Dartium 无法在 windows 上构建

Dartium fails to build on windows

我正在尝试在 windows 上构建 Dartium 版本,但我一直 运行 遇到问题。

我正在尝试使用专有编解码器构建 Dartium,因此我可以在 MP4 文件中播放 AAC 编解码器,这是普通 Dartium 无法播放的。

[22/22259] CXX obj\dart\runtime\vm\libdart_vm.thread.obj
FAILED: obj/dart/runtime/vm/libdart_vm.thread.obj
ninja -t msvc -e environment.x86 -- "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\dart\runtime\vm\libdart_vm.thread.obj.rsp /c ..\..\dart\runtime\vm\thread.cc /Foobj\dart\runtime\vm\libdart_vm.thread.obj /Fdobj\dart\runtime\libdart_vm.cc.pdb
c:\dart\dartium\src\dart\runtime\vm\thread.cc(459) : error C2220: warning treated as error - no 'object' file generated
c:\dart\dartium\src\dart\runtime\vm\thread.cc(459) : warning C4172: returning address of local variable or temporary: func
[25/22259] CC obj\third_party\opus\src\silk\opus.resampler_rom.obj
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "C:\dart\dartium\src\dart\tools\dartium\build.py", line 58, in <module>
    main()
  File "C:\dart\dartium\src\dart\tools\dartium\build.py", line 55, in main
    + targets)
  File "C:\dart\dartium\src\dart\tools\dartium\utils.py", line 112, in runCommand
    raise Exception('Failed to run command. return code=%s' % p.returncode)
Exception: Failed to run command. return code=1

我在 windows 2016 数据中心 (VM) 上构建它,我安装了 Dart 32 位,Visual Studio 2015,带有 windows SDK,并按照以下说明操作:https://github.com/dart-lang/sdk/wiki/Building-Dartium

如果你加上

#pragma warning disable C4172

thread.cc 的顶部,应该可以修复编译。