Gary explains how to use the Zig compiler as a zero-dependency, drop-in replacement for C and C++ compilers with cross-compilation support.
Zig is a general-purpose, open source programming language for Windows, Linux, and macOS. Its features include no hidden control flow or a preprocessor. However it can also be used as a zero-dependency, drop-in C/C++ compiler that supports cross-compilation out-of-the-box. In this video I demonstrate how to use it as a C/C++ compiler and how to do cross compilation.
---
Let Me Explain T-shirt: teespring.com/gary-explains-let-me-explain-2
Twitter: twitter.com/garyexplains
Instagram: instagram.com/garyexplains/
#garyexplains
Why it's here
2 people recommend this
What people say. Recommended as a helpful guide for using Zig to compile C and C++ code across different platforms.
k
u/karius85in r/C_Programming • Recommends
On “Unable to locate a C compiler that will actually download”
Perhaps an unpopular opinion, but Zig is an option, it has a built in C compiler.
Related: link to this video
**Disclaimer**: never watched the video nor used Zig as a C compiler for Windows.
On “how do i use zig, specifically as a compiler for c++”
Have a look at:
link to this video
Python is a better place to start programming. You can use a distribution like Anaconda (Google it). I am so old that my first language was TRS 80 Basic, and I was studying for a degree in math/computation. Then I worked as a programmer for 30 years. When I retired, I felt it would be too soon if I never wrote a program again. Slowly, I relented and occasionally did some programming. I have been watching ZIG with great interest, and it is a paradigm shift still maturing. A bit from the best place to start. After you feel confident with Python, you can learn Zig:
[video
IMHO, over time, everything will be done with ZIG. We will have Linux distribut…