#Android <spawn.h> problem

1 messages · Page 1 of 1 (latest)

unreal nexus
#

Help would be appreciated!

pulsar barn
#

also, is spawn.h definitely being #included?

unreal nexus
unreal nexus
pulsar barn
#

you need to specify __ANDROID_MIN_SDK_VERSION__

unreal nexus
#

same error with:

      var exe: *std.Build.Step.Compile = if (t.result.abi.isAndroid()) b.addLibrary(.{
           .name = exe_name,
           .root_module = app_module,
           .linkage = .dynamic,
       }) else b.addExecutable(.{
           .name = exe_name,
           .root_module = app_module,
       });

       const sdl = b.dependency("sdl", .{
           .target = t,
           .optimize = optimize,
       });

       const sdl_lib = sdl.artifact("SDL3");

       sdl_lib.addSystemIncludePath(.{ .cwd_relative = "/home/leeb/Android/Sdk/ndk/29.0.13599879/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/"});
       exe.linkLibC();
       exe.linkLibrary(sdl_lib);
       exe.root_module.addCMacro("__ANDROID_MIN_SDK_VERSION__", "28");
       exe.addSystemIncludePath(.{ .cwd_relative = "/home/leeb/Android/Sdk/ndk/29.0.13599879/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/"});
#

I hope we can talk about this later since I need to go right now

pulsar barn
unreal nexus
#

sure

pulsar barn
#

ty :)

pulsar barn
unreal nexus
#

Now there are even more errors and the errors from before persist lol

#
<command line>:8:9: error: '__ANDROID_MIN_SDK_VERSION__' macro redefined```

and also this?
pulsar barn
#

hmm okay interesting

unreal nexus
#

I think zig-android-sdk already defines the api level

pulsar barn
#

ah, yes that would make sense

unreal nexus
#

and android 15 should be fine though

#

(api level35)

pulsar barn
#

hmm why are you setting include paths yourself if you're using an existing android sdk package?

#

shouldn't it set those for you?

#

also you don't seem to ever make the android sdk package aware of the SDL library, you probably need to do that somehow

#

idk exactly how because i'm not familiar with the package

unreal nexus
#

But I just skimmed over it, so I can't guarantee that I did everything they did there

#

Imma open up an issue in the zig-android-sdk for that