You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following application will produce an access violation on windows, and when compiling with the "windows" subsystem, will not report any error to the user:
conststd=@import("std");
constw=std.os.windows;
pubextern"user32"fnMessageBoxA (
hWnd: ?w.HWND,
lpText: [*:0]constu8,
lpCaption: [*:0]constu8,
uType: u32,
) callconv(w.WINAPI) c_int;
pubexportfnwWinMainCRTStartup() callconv(w.WINAPI) noreturn {
// comment out the next line to show that the program works and produces a message box
(@intToPtr(fn() void, 1))();
_=MessageBoxA(null, "Hello", "We are here", 0);
w.kernel32.ExitProcess(0);
}
Here's how to build:
zig build-exe bug.zig --single-threaded --subsystem windows
Note that when the --subsystem windows arguments are removed, it will popup an error window and provide the user a chance to debug the problem. The problem is that when using the "windows" subsystem, process just dies with no information and no error reported to the user.
The text was updated successfully, but these errors were encountered:
The following application will produce an access violation on windows, and when compiling with the "windows" subsystem, will not report any error to the user:
Here's how to build:
Note that when the
--subsystem windows
arguments are removed, it will popup an error window and provide the user a chance to debug the problem. The problem is that when using the "windows" subsystem, process just dies with no information and no error reported to the user.The text was updated successfully, but these errors were encountered: