c++xcodejuce

Where program entry point is defined when building and runing C+/Juce project in Xcode?


I'm trying to build C++ project in XCode and JUCE: https://github.com/spiricom/LEAF it has prepared example project for JUCE which generates Xcode project.

It runs with no errors, and I can see the application is working.

Yet I cannot find where in my project settings is program entry point defined, also there is no main() in this code and I can't understand how to set a breakpoint on first line of debug..

How do I find the entry point, and possibly redefine it using Xcode? Thanks!

T


Solution

  • int JUCEApplicationBase::main (int argc, const char* argv[]) is hidden in /JUCE Modules/juce_events/messages/juce_ApplicationsBase.cpp

    Main is hidden in /JUCE Modules/juce_auido_plugin_client/juce_audio_plugin_standalone.cpp:

    Answer how this hooks in to the external code (LEAF in my case) :

    You should derive your own class from from juce::AudioProcessor and if you're building a plugin, you should implement a global function called createPluginFilter() which creates and returns a new instance of your subclass.

    Callstack made it easy to understand once I figured out how to drop breakpoint in xcode:

    call stack