#Cross Compile C With Zig
1 messages · Page 1 of 1 (latest)
you can do something like zig cc main.c -target aarch64-macos-gnu
there's a list of targets you can get by running zig targets
given you are working with a makefile, we'd need to know more details on the specific makefile
It is working for mac. But not working for windows
what's it saying?
CC = zig cc -target aarch64-macos-none is working fine. But I want to compile it for windows.
x86_64-windows-gnu
CC = zig cc -target x86_64-windows-gnu main/php_config.h:2274:10: fatal error: 'sys/select.h' file not found
#include <sys/select.h>
posix headers won't be available on windows
How to fix this type of errors ?
fix the code to not use POSIX headers on windows
since they arent available on windows
I tried for Linux from mac. CC = zig cc -target x86_64-linux-gnu I am compiling php source code. Headers issues. Any solusions?