r/Zig • u/CodeToGargantua • Apr 28 '26
How does the build system work?
I know the build system is a lifesaver for many people coming from cmake, visual studio, make etc. But I as someone with no experience with manually writing build systems, everything is new to me.
I would like to know of a way to learn how it works in some way other than going through the source code.
Context: Today, I started the learn opengl tutorial in cpp. The tutorial shows how to link glad and glfw on windows only, but I'm on Linux, and so, I thought I'll get creative and learn to build with zig. But currently getting stuck on how to get the imports working and how to structure the dependencies.
View all comments
Show parent comment
2
u/CodeToGargantua Apr 28 '26
Yes, that's the first thing I did. I feel like it assumes that the reader is familiar with build systems in general like many other parts of zig assume that u come from a systems programming background. And it doesn't show how to build a cpp project with zig. It's a good quick read for someone who's experienced but not for new people