I decided I have to do some SDL stuff, instead of digging into the windows API.
This is step zero for me… Never did anything with the plethora of graphics / sound etc. possibilities.
What I do not want is a build.zig of 2000 lines with SDL stuff.
So the (for me) cleanest and easiest way is maybe what I saw here: here
(The code on github in the description of the video).
The only riddle I stumbled upon was this:
pub const c = @cImport({
@cInclude("SDL3/SDL.h");
});
Where or where is the location of this? What is the magic behind it?
The magic behind it is the same as C include: The zig compiler will search in the include paths for the header. If these are headers are installed in known locations, it will find them and link them up.
Like @pasta said, it is going away. So you will have to use translate-c in the future. And that will remove some of the magic.