我正在尝试在Windows计算机上安装Chromium。我正在密切关注来自Chromium项目站点的instructions链接。我尝试运行命令'This doesn't effect anything that stored a reference to it.
Set TestClass = Nothing
'Make a call on the default to force it to reinstantiate.
Debug.Print TestClass.IsDefaultInstance
'This will now be false.
Debug.Print foo(5).IsDefaultInstance
,但收到以下错误消息(某些路径已匿名):
gn gen out/Default
看一下setup_toolchain.py的来源(错误发生的地方),我认为问题出在以下几行:
Traceback (most recent call last):
File "C:/path/to/chromium/src/build/toolchain/win/setup_toolchain.py", line 292, in <module>
main()
File "C:/path/to/chromium/src/build/toolchain/win/setup_toolchain.py", line 284, in main
assert vc_lib_um_path
AssertionError
ERROR at //build/toolchain/win/BUILD.gn:408:30: Script returned non-zero exit code.
win_64bit_toolchain_data = exec_script("setup_toolchain.py",
^----------
Current dir: C:/path/to/chromium/src/out/Default/
Command: C:/path/to/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe C:/path/to/chromium/src/build/toolchain/win/setup_toolchain.py "C:\Program Files (x86)/Microsoft Visual Studio/2017/Enterprise" "C:\Program Files (x86)\Windows Kits\10" "C:\WINDOWS\Sysnative;C:\WINDOWS/SysWOW64" win x64 environment.x64
Returned 1 and printed out:
vc_bin_dir = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX64\\x64"
include_flags_I = "\"/I..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.15.26726\\ATLMFC\\include\" \"/I..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.15.26726\\include\" \"/I..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\ucrt\" \"/I..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\shared\" \"/I..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\um\" \"/I..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\winrt\" \"/I..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\cppwinrt\""
include_flags_imsvc = "\"-imsvc..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.15.26726\\ATLMFC\\include\" \"-imsvc..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.15.26726\\include\" \"-imsvc..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\ucrt\" \"-imsvc..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\shared\" \"-imsvc..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\um\" \"-imsvc..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\winrt\" \"-imsvc..\\..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\cppwinrt\""
vc_lib_path = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.15.26726\\lib\\x64"
vc_lib_atlmfc_path = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.15.26726\\ATLMFC\\lib\\x64"
See //build/toolchain/win/BUILD.gn:458:1: whence it was called.
win_64bit_toolchains("x64") {
^----------------------------
See //BUILD.gn:61:1: which caused the file to be included.
group("gn_all") {
^----------------
Traceback (most recent call last):
File "C:/path/to/chromium/src/build/toolchain/win/setup_toolchain.py", line 292, in <module>
main()
File "C:/path/to/chromium/src/build/toolchain/win/setup_toolchain.py", line 284, in main
assert vc_lib_um_path
AssertionError
添加一些打印语句后,似乎循环正在检查以下路径是否存在:
for path in env['LIB'].split(';'):
if os.path.exists(os.path.join(path, 'User32.Lib')):
vc_lib_um_path = os.path.realpath(path)
break
这些路径都不存在。我对Windows,Visual Studio或C的了解并不十分了解,无法知道User32.Lib的含义。 Visual Studio应该在某处添加了它吗?或者,当我安装Windows 10 SDK时,是否应该在某处生成文件?有什么我可以解决的问题吗?
我正在努力找出可能出问题并导致此问题的原因,我们将不胜感激。
答案 0 :(得分:0)
看起来像GN找不到所需的运行时要求。脚本对此有些脆弱。 就我而言,我安装了Visual 2017和2019,就会发生此问题。因此,我卸载了Visual 2019并运行良好。 重新验证运行时规范(SDK,VS版本,路径等)。 https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart.md#markdown-header-windows-setup