I am trying build android target with ndk.
I found zig build
could set libc. But how to add a library path?
First, I try: zig build rundemo -Dtarget=x86_64-linux-android
compiler complain can’t find c/c++ header.
Then, I add libc arg: zig build rundemo -Dtarget=x86_64-linux-android --libc ndk.conf
.
then compiler complain can’t find android system library.
Then, I try set --sysroot
and --search-prefix
, compiler still can’t find android system library.
Now I must do it in build.zig:
module.addLibrary(path);
It worked, but is there a simpler way?