marlersoft / zigwin32

Zig bindings for Win32 generated by https://github.com/marlersoft/zigwin32gen
MIT License
234 stars 30 forks source link

error: use of undeclared identifier 'c_void' #8

Closed revivalizer closed 2 years ago

revivalizer commented 2 years ago

Zig n00b here.

I am trying to use zigwin32, but keep getting error: use of undeclared identifier 'c_void'. I found that I could reproduce this on windows-remote-control, as demoed in the Zig Showtime talk.

Steps to reproduce: 1) git clone https://github.com/marler8997/windows-remote-control 2) cd windows-remote-control 3) zig build 4) [git clone zigwin32 long string] 5) zig build

Expected result: windows-remote-control builds

Actual result: Many lines of "error: use of undeclared identifier 'c_void'"

C:\code\windows-remote-control (master -> origin)
λ zig version
0.9.0-dev.2023+16b753549
revivalizer commented 2 years ago

Found this in Zig 0.9.0 Release Notes: https://ziglang.org/download/0.9.0/release-notes.html#c_void-renamed-to-anyopaque

Can work around by doing a zig fmt on the zigwin32 folder.

marler8997 commented 2 years ago

Should be fixed here: https://github.com/marlersoft/zigwin32/commit/a74c9dae6a1ccd361eb9a1d146a09c08d22f02b0

revivalizer commented 2 years ago

Works for me! Thank you! And happy holidays :)