Fixed: At least you can build it successfully.#19
Fixed: At least you can build it successfully.#19hwoy wants to merge 2 commits intomarlersoft:mainfrom
Conversation
hwoy
commented
Jan 4, 2023
modified: README.md modified: examples/basewin.zig modified: examples/helloworld-window.zig modified: src/genzig.zig modified: src/zig.zig
|
FIXED: building was not successfully!!! |
|
Thanks for the contribution. Could you remove any formatting changes you've made to make it easier to review the logic/behavior changes? |
modified: examples/basewin.zig modified: examples/helloworld-window.zig #modified: src/genzig.zig
|
|
||
| ## How to generate the Windows Zig bindings | ||
|
|
||
| First, clone the zigwin32 repo from the root of this repository to provide a location for the generated files: |
There was a problem hiding this comment.
I don't think these changes to the README are correct. Here's how you could build zigwin32gen from scratch:
$ git clone https://github.com/marlersoft/zigwin32gen
$ cd zigwin32gen
$ git clone https://github.com/marlersoft/zigwin32
# NOTE if you forget to run the command above, the error message will explain you haven't cloned the zigwin32 repo
$ zig build -Dfetch
# Adding the -Dfetch will cause the build to fetch the win32json repo for you (the error message you get explains this)Lately I've been realizing that requiring the -Dfetch option for dependencies is a bit annoying, maybe I'll change it so it's not required.
|
I think you may have run into build issues because your zig compiler is a little old. When I build this branch with the latest Zig I get compile errors because I think you reverted some of the code to use an older version of the std library/compiler. |
|
I think zigwin32 is generated by genzig using win32json database. |
That's correct. The build automatically downloads the win32json database (you just have to provide it with |
|
zig version 0.10.0 x86_64 windows I have no reason to clone zigwin32 when it is generated from win32json. I am a new in ziglang. |
|
You might be interested in a talk I did on this project: https://www.youtube.com/watch?v=HsnWZxrf5VE More towards the end of the video I show a couple projects that use zigwin32 which might help you use it in your own projects. Most people don't need to worry about this repo |