Skip to content

Latest commit

 

History

History

c-cpp-zig

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

C/C++/Zig

Demonstrates how to compile a program consisting of a mix of C, C++ and Zig code.

Entered main.c
Hello from C!
Hello from C++!
Hello from Zig!
Leaving main.c

Building

Requires Zig 0.12.1, 0.13.0 or 0.14.0-dev (master).

# Build/run the app using the C entry point
zig build run -Dmain=c

# Build/run the app using the C++ entry point
zig build run -Dmain=cpp

# Build/run the app using the Zig entry point
zig build run -Dmain=zig