I am new to C++ and Juce, but managed to build a plugin relatively easy, thanks to Juce and its community!
I am currently struggling to make my plugin receive joystick events. (I am on OSX 10.10, Juce 5, Xcode 7.2.1)
I am using SDL for joystick event handling, and I can successfully run a basic application outside my plugin, but once I started integrating SDL code with the plugin, the compiler complains about:
“_SDL_Init”, referenced from:
ld: symbol(s) not found for architecture x86_64
I have tried initializing SDL ‘SDL_Init(SDL_INIT_JOYSTICK)’ in different places/constructors (Processor, Editor…) with no luck.
My plan was to initiate SDL in a constructor, then have the SDL event loop (while(SDL_PollEvent(&event) != 0)) inside a juce timerCallback.
I have the following doubt: to my info SDL uses a macro to rename main() at compile time!!, and since with plugins, main() actually runs inside the plugin host, this might be leading to the issue.
I would appreciate any pointer on how to get joystick control with a Juce plugin, or if any alternative approach can be suggested