英文:
Capy-template build errors
问题
我在Ubuntu上使用git安装了capy-template。我遇到了大量的Windows错误。我对zig完全不了解,也不知道为什么会出现Windows错误。
zig build后跟着错误的详细信息。
$ zig build
zig build-exe okp Debug native: error: 以下命令失败,出现520个编译错误:
/usr/local/zig/zig build-exe /home/nil/zig/capy/okp/src/main.zig -lgtk+-3.0 -lc --cache-dir /home/nil/zig/capy/okp/zig-cache --global-cache-dir /home/nil/.cache/zig --name okp --mod capy:zigimg,zigwin32:/home/nil/zig/capy/okp/.zigmod/deps/git/github.com/capy-ui/capy/src/main.zig --mod zigimg::/home/nil/zig/capy/okp/.zigmod/deps/git/github.com/capy-ui/capy/vendor/zigimg/zigimg.zig --mod zigwin32::/home/nil/zig/capy/okp/.zigmod/deps/git/github.com/capy-ui/capy/vendor/zigwin32/win32.zig --deps zigwin32,capy --subsystem native --listen=-
构建摘要:0/3步骤成功;1失败(使用 --summary none 禁用)
运行传递失败
+- 运行 okp 传递失败
+- zig build-exe okp Debug native 520 个错误
.zigmod/deps/git/github.com/capy-ui/capy/vendor/zigwin32/win32/zig.zig:142:32: 错误:无效的内建函数:'@intToPtr'
.zigmod/deps/git/github.com/capy-ui/capy/vendor/zigwin32/win32/zig.zig:161:63: 错误:无效的内建函数:'@ptrToInt'
...
...
英文:
I installed the capy-template with git on ubuntu. I'm getting zillions of windows errors. I'm totally new to zig and I have no clue as to why I'm getting windows errors.
zig build followed by it's dump of errors.
$ zig build
zig build-exe okp Debug native: error: the following command failed with 520 compilation errors:
/usr/local/zig/zig build-exe /home/nil/zig/capy/okp/src/main.zig -lgtk+-3.0 -lc --cache-dir /home/nil/zig/capy/okp/zig-cache --global-cache-dir /home/nil/.cache/zig --name okp --mod capy:zigimg,zigwin32:/home/nil/zig/capy/okp/.zigmod/deps/git/github.com/capy-ui/capy/src/main.zig --mod zigimg::/home/nil/zig/capy/okp/.zigmod/deps/git/github.com/capy-ui/capy/vendor/zigimg/zigimg.zig --mod zigwin32::/home/nil/zig/capy/okp/.zigmod/deps/git/github.com/capy-ui/capy/vendor/zigwin32/win32.zig --deps zigwin32,capy --subsystem native --listen=-
Build Summary: 0/3 steps succeeded; 1 failed (disable with --summary none)
run transitive failure
+- run okp transitive failure
+- zig build-exe okp Debug native 520 errors
.zigmod/deps/git/github.com/capy-ui/capy/vendor/zigwin32/win32/zig.zig:142:32: error: invalid builtin function: '@intToPtr'
.zigmod/deps/git/github.com/capy-ui/capy/vendor/zigwin32/win32/zig.zig:161:63: error: invalid builtin function: '@ptrToInt'
...
...
答案1
得分: 1
这是编译器中一个非常新的更改。运行 zig fmt .zigmod/deps/git/github.com/capy-ui/capy
应该能解决它。
英文:
this is a very recent change in compiler. running zig fmt .zigmod/deps/git/github.com/capy-ui/capy
should fix it.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论