marlersoft / zigwin32gen

Generates Complete Zig bindings for Win32. See https://github.com/marlersoft/zigwin32 for the bindings themselves.
108 stars 17 forks source link

Fixed: At least you can build it successfully. #19

Open hwoy opened 1 year ago

hwoy commented 1 year ago
modified:   README.md
modified:   examples/basewin.zig
modified:   examples/helloworld-window.zig
modified:   src/genzig.zig
modified:   src/zig.zig
hwoy commented 1 year ago

FIXED: building was not successfully!!! FIXED: example-> add win32.LoadCursor(null,win32.IDC_ARROW)

marler8997 commented 1 year ago

Thanks for the contribution. Could you remove any formatting changes you've made to make it easier to review the logic/behavior changes?

marler8997 commented 1 year ago

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.

hwoy commented 1 year ago

I think zigwin32 is generated by genzig using win32json database.

marler8997 commented 1 year ago

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 -Dfetch). The error message you get when you don't provide that option explains it.

hwoy commented 1 year ago

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. I like to see WINAPI in ziglang.

marler8997 commented 1 year ago

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 zigwin32gen because it's only purpose is to output the full win32 bindings in the zigwin32 repo (see https://github.com/marlersoft/zigwin32).