我正在尝试在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 Datacenter(VM)上构建它,我已经安装了Dart 32bit,Visual Studio 2015和Windows SDK,并按照以下说明进行操作:https://github.com/dart-lang/sdk/wiki/Building-Dartium
答案 0 :(得分:1)
如果你添加
#pragma warning disable C4172
位于thread.cc
的顶部,应修复编译。