I’m new to the JUCE framework, and I created my first project, which is a demo static library, that I plan to use in a native iOS app.
So I created a new JUCE project, open it in Xcode, and then I went to Product > Build (in Xcode) to get my static .a library.
But even though I have the Debug and Release targets in Projucer for my project, I only get a iOS/build/Debug/libTest.a file generated (so only for debug, but nothing for release)…
So how can I generate a release build for my static library for iOS?
Your build system will have a way of setting the ‘header search paths’ or ‘include paths’. You’ll need to add the JUCE modules folder to the set of include paths. There should also be a “JuceHeader.h” located in the JuceLibraryCode folder of your project. You’ll need to add the JuceLibraryCode directory path to the set of include paths too.
For a staticlib target, I’d also recommend enabling the “Use Global AppConfig” setting in the Projucer, as this will make it easier to ensure that the same preprocessor definitions are used inside the library, and by code including the library.
import my libTest.a library in the root of the project
import the JuceLibraryCode directory, also in the root of the project
import the JUCE modules directory, also in the root of the project
But it still not working: when I open the JuceHeader.h file in my project, it doesn’t find the #include files (for example: #include <juce_audio_basics/juce_audio_basics.h>)
Also, I found the Header Search Paths item in my project (in Build Settings), but I don’t really know what to put in there…
I really think that a detailed tutorial on how to create a Hello World library and how to import it in an iOS (and also Android) project would be very helpful (well, at least for me )