Using VST with JUCE_DLL


Hi there,
I had to add JUCE_API macro on different lines in order to export symbols in JUCE DLL to use them in VST plugins.
Here are the lines :

juce_VST_Wrapper.cpp, l.150: extern JUCE_API void juce_callAnyTimersSynchronously();
juce_VSTPluginFormat.cpp, l.123: extern JUCE_API void juce_callAnyTimersSynchronously();
juce_AudioPlayHead.h, l. 113: JUCE_API void resetToDefault();
juce_Timer.cpp, l.322: JUCE_API void juce_callAnyTimersSynchronously()

That’s all folks !


Hmm, not a combination I’ve ever tried before.

Thanks, I’ll update those callAnyTimers functions, but it doesn’t make any sense to add it to resetToDefault(), because that’s a method, not a function, and it’s in a class that’s already exported (?)


Hi Jules,

Thanks for the response.
I come up with new fresh information : JUCE_API is also needed in front of operators (!= & ==) of struct CurrentPositionInfo defined in juce_AudioPlayHead.h.
In fact, it seems to export only members from first class (AudioPlayHead), but does not export deeper definitions, as functions of CurrentPositionInfo.
So, finally, I think it’s better to reexport internal definitions of CurrentPositionInfo using JUCE_API on struct directly, i.e. modifying line 65 of header by:
struct JUCE_API CurrentPositionInfo


Ok, I thought that exporting the outer class would also export its nested classes, but I guess not…