python - 无法在 Windows 10 中构建 V8

标签 python c++ visual-studio v8 embedded-v8

我使用此链接作为引用(https://medium.com/angular-in-depth/how-to-build-v8-on-windows-and-not-go-mad-6347c69aacd4)来构建 v8,但我认为它已经过时或者我做错了什么。
我无法运行此( ninja -C out.gn/x64.release )命令,因为它不断显示此错误

ninja: error: loading 'build.ninja': The system cannot find the file specified.

ninja: Entering directory `out.gn\foo

我也收到此错误
D:\v8_dev\v8Engine\v8>gn args out.gn\foo
Waiting for editor on "D:\v8_dev\v8Engine\v8\out.gn\foo\args.gn"...
Generating files...
Traceback (most recent call last):
  File "D:/v8_dev/v8Engine/v8/build/vs_toolchain.py", line 561, in <module>
    sys.exit(main())
  File "D:/v8_dev/v8Engine/v8/build/vs_toolchain.py", line 557, in main
    return commands[sys.argv[1]](*sys.argv[2:])
  File "D:/v8_dev/v8Engine/v8/build/vs_toolchain.py", line 371, in CopyDlls
    _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=False)
  File "D:/v8_dev/v8Engine/v8/build/vs_toolchain.py", line 346, in _CopyRuntime
    suffix)
  File "D:/v8_dev/v8Engine/v8/build/vs_toolchain.py", line 284, in _CopyUCRTRuntime
    assert len(ucrt_files) > 0
AssertionError
ERROR at //build/toolchain/win/BUILD.gn:49:3: Script returned non-zero exit code.
  exec_script("../../vs_toolchain.py",
  ^----------
Current dir: D:/v8_dev/v8Engine/v8/out.gn/foo/
Command: D:/v8_dev/depot_tools/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe D:/v8_dev/v8Engine/v8/build/vs_toolchain.py copy_dlls D:/v8_dev/v8Engine/v8/out.gn/foo Release x64
Returned 1.
See //BUILD.gn:905:1: which caused the file to be included.
action("postmortem-metadata") {
^------------------------------

最终我希望它像嵌入图片中显示的那样工作 enter image description here

最佳答案

如果您正在寻找解决方案,请点击此链接 (https://github.com/pmed/v8-nuget) 供 Visual Studio 用户使用,它工作得非常好,没有任何麻烦。

关于python - 无法在 Windows 10 中构建 V8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60789977/

相关文章:

c++ - 在 C 中的 _asm block 中使用局部变量

c++ - 如何在 C++ 中将数字字符串拆分为数组?

Visual Studio 2012 中的 C

visual-studio - 如何更改预处理器条件的颜色,例如 Visual Studio 中的#if?

python - httplib2 是否完全支持 http 代理? socks 代理工作但不是 http

python - emacs 解释器中的命令历史记录

python - 使用特定的类/函数预加载 Jupyter Notebook

匹配字典的pythonic方式

c++ - 包含语句 : can't find SDL/SDL. h 文件

visual-studio - 为什么在 Visual Studio 中连续的 int 数据类型变量位于 12 字节偏移处?