Conversation

That makes sense, but that wouldn't explain why add_subdirectory was "passing" the correct variables when invoking add_subdirectory on ode (so appears to have loaded without problems) but not when invoking add_subdirectory on puredata (so having problems).
1
The issue is almost certainly that the build system is supposed to be passing -D__ANDROID_API__=21 to communicate that minSdkVersion is 21 but it's passing something else instead. If you set it to that by hand, the problem would go away, but you should figure out what's wrong.
2
- The way CMake (our build system) does Android support is we feed it an android.toolchain.cmake from NDK_HOME and this sets all relevant variables. It doesn't appear to set __ANDROID_API__, nor does our CMakeLists.txt (CMake project config).
1
I cannot vouch for our current system as I did not design it. I maintained the prior build system, which had Gradle invoking CMake. The pure-CMake setup is new. It's possible Gradle read AndroidManifest.xml, saw the minSdkVersion there, and translated that into a CMake define...
1
If this is the case, then this simply means that our new non-Gradle setup would need to have the human specify those AndroidManifest.xml-related defines by hand. But I'm not clear who they should be defined to (to CMake? To toolchain.cmake? To clang?)
1
Since you have minSdkVersion 21, Android hides the symbols introduced after API 21 from your app in the linker and there's no fortified sendto available. However, your build system isn't setting __ANDROID_API__=21 so it's building code for the latest API level, probably API 30.
2
Show replies