[solved] Migrating from GUI application to standalone plugin

Way back when I started my project, I used the GUI application template in the ProJucer. Now that it’s more mature, I’m trying to upgrade it into a standalone plugin. If possible, I would like to do this entirely by the existing project, rather than starting a new one and copying the old files across. (I’ve already tried the latter method, and it’s not as easy as it sounds). I’ve read a lot of old posts on this forum and I feel like I’m almost there, but I’m running into a linker error at the very end.

I’m modeling it off of the EngineInPlugin demo, because I want to get Tracktion running too. Here’s what I’ve done so far:

1 Ensure that the fundamental class is an AudioProcessor, which owns a transient AudioProcessorEditor for the GUI. (This part compiles).
2. Updated the Projucer properties so that the project type is “Audio plug-in”
3. Add the JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP=1 flag to the preprocessor definitions.
4. Remove the START_JUCE_APPLICATION macro and replace it with a AudioProcessor* JUCE_CALLTYPE createPluginFilter() function.

Compiling this, I get the following Linker error: unresolved external symbol WinMainCRTStartup. I can’t find WinMainCRTStartup anywhere in the JUCE files, so I’m stuck. Can anyone see what I’m missing?

If migrating a project like this is a bad idea then I’ll do it the other way; it’s just choosing one set of headaches over another.

The missing step was to add the juce_audio_plugin_client module.