0

我正在尝试在 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 32bit、Visual Studio 2015 和 Windows SDK,并按照以下说明操作:https ://github.com/dart-lang/sdk/wiki/Building -Dartium

4

1 回答 1

1

如果你添加

#pragma warning disable C4172

在顶部thread.cc,应该修复编译。

于 2017-03-09T13:47:40.037 回答