marlersoft / zigwin32gen

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

_T function in ansi mode generates return type error. #8

Open Flaminator opened 3 years ago

Flaminator commented 3 years ago

The _T function found in /src/zig.zig#L17 gives back the following error when you use it when running the program in ansi mode:

.\win32\win32\zig.zig:17:75: error: expected type '*const [4:0]u8', found '[]const u8'

Ran into this when I was playing around trying to see if I could build my program run on Windows 2000(Found out it doesn't).

marler8997 commented 3 years ago

How did you enable ansi mode? I believe I hardcoded it to wide because of a compiler bug. Did you just modify the mode in the source code?

Flaminator commented 3 years ago

I did change the source code yes, I enabled ansi mode by changing the following line in /src/zig.zig#L9 from:

pub const unicode_mode = UnicodeMode.wide;

to:

pub const unicode_mode = UnicodeMode.ansi;