Compiling hello win32 C application in Zig
This is very similar to compiling C source in Zig but this time using win32 API.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) | |
{ | |
MessageBox(NULL, "Hello, Windows!", "Hello, Windows!", MB_OK); | |
return 0; | |
} |
To compile using Zig, do:
PS C:\prj\hello-win> zig cc .\hello-win32.c -o hello-win32.exe
No comments:
Post a Comment