Hi, new to Android dev so wondered if someone could help me out. I have a static library that I’m building and wanting to link into a main project. Am ok doing this with win, osx and iOs, but not really sure what the output of the static library build is under Android and how to go about including that into the main project…
Just a quick note: Building static libraries and linking to them in other JUCE projects can really be a lot of hit & miss for a variety of reasons (incompatible build flags, duplicate symbols (especially if both projects use JUCE), strange order of static initialisers, etc.). Consider creating your own JUCE module instead.
In any case, we will have a fix for building static libraries on Android.
We are actively working on supporting this use-case better. For now, if you are sure that both libraries are using the exact same version of JUCE you can simply tell the linker to ignore duplicate symbols. We do this with ROLI’s Noise app for example and it doesn’t seem to cause any problems.
One thing you can do already now, is to manually remove any JUCE modules from being built in the static library: i.e. just keep the includes that include the JUCE headers and your own code.
The missing JUCE symbols will then be resolved when you link your JUCE app.