Sunday, March 23, 2025

Compiling helloworld.c C application using Zig

Compiling helloworld.c C application using Zig

Zig can be used to compile C source code. Below shows a very simple C source code, helloworld.c.
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
view raw helloworld.c hosted with ❤ by GitHub
Copy and save this to a file, say, in C:\hello-c\helloworld.c
To compile using Zig, do:
PS C:\hello-c> zig cc .\helloworld.c -o helloworld.exe

No comments:

How to configure nfs server on QNX 7.1

How to configure nfs server on QNX 7.1 Target: QNX 7.1 running on a VM (VMware Workstation or VirtualBox). It is assummed that the targets ...