For fun, I have decided to follow this guide on a pokemon gba decomp using zig 0.15.2. While I have gotten it to build and can import zig code into C, I've decided to expand out into trying to convert some existing code to zig just to see what I could do. My current goal is to replace 1 (one) function in a file with a zig function in a new file, import the dependencies in zig using cImport, then import the translated zig function back into its original file for use in the C code. (I'm handwriting the headers. It's fine.)
The problem I'm running into is importing the C code. The project doesn't have a build.zig and is just using a makefile, which you can see in the article. Any help?
Personal blog on software development, game modding