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.
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 <stdio.h> | |
int main() { | |
printf("Hello, World!\n"); | |
return 0; | |
} |
To compile using Zig, do:
PS C:\hello-c> zig cc .\helloworld.c -o helloworld.exe
No comments:
Post a Comment