Hi,
I am fairly new to Android development and I am struggling with a C++ linking issue. This is on Windows 10, where we use JNI to call a C++ class that in turn executes the google unit tests that we have for all our C++ code. Since our application is written in C++ and needs to work on both Windows and Android, we want to run the same native unit tests on both platforms. The shared objects are compiled using ndk-build and we are linking to said .so files using CMake, to be able to run all our unit tests.
By default Android Studio uses `cmd.exe /C ""list-of-all-arguments""` on Windows to link the shared objects and since there are quite a few, it blows up past the 8192 cmd.exe character limit.
It seems there is a way to tell cmake to use a "response file" but Android Studio *still* runs "cmd /c list-of-all-arguments" so it fails the same way (or I haven't correctly updated the CMakeLists.txt or build.gradle files).
There are apparently ways to configure the `executable` and `args` parameters in build.gradle but I can't find any useful documentation describing this, so I am stuck yet again.
How do I get around the issue of the "list-of-all-arguments" imposed by Android Studio (by insisting on using "cmd.exe /C list-of-all-arguments")?
A quick glance shows that there are 44 .so objects that I need to link but because of the file locations, including the full path to the cmake.exe and clang++.exe executables (six references to the full path where ndk-bundle is located, each is at least 80 characters long so that's around 500 characters right there), the argument passed to "cmd.exe /C" is longer than 8192 characters.
I would really appreciate it if someone could help me get around this Windows-specific limitation.
Thank you,
R.G.