Since 0.16 has left the traditional cInclude and cImport structure and moved everything to build.zig, a lot of the things changed. I've been able to figure out how to compile a C/C++ file through trial and error. But how do I choose a C/C++ compiler version? All guides I've found refer to the old way to compile C/C++ and I didn't find anything in the documentation that would hint at the solution.
#How do I choose the C/C++ std version in 0.16?
1 messages · Page 1 of 1 (latest)
i assume youre using addCSourceFile(s) somewhere, it takes a flags argument
you can pass -std=c99 for example
If you mean translate-c
https://codeberg.org/ziglang/zig/issues/35568
Thank you. 🙂
C works fine, C++ does not. But further research told me Zig can't compile C++ headers.