I was trying to set up a very simple plugin with projucer, but encountered the following error when trying to compile the standalone version on Win64 VC2019:
2>LINK : fatal error LNK1104: cannot open file '<projectname>.lib'
Eventually, I learned that the fatal error
You are trying to use START_JUCE_APPLICATION in an audio plug-in. Define JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP=1 if you want to use a custom standalone target app.
actually was relevant, despite seeing on these forums that it wasn’t and could be ignored. At this point, I encountered the following error:
unresolved external symbol _DllMainCRTStartup
This prompted me to compile the AudioPluginDemo, which compiled perfectly on all fronts (but seems to be completely different from the project directory generated by projucer, for some reason). I then tried to compile my project with WSL, which of course worked perfectly, because Windows was developed by orangutans. Of course, I can’t run any linux-compiled VST3 project on my windows machine without Clara, so back to fiddling with VC2019. By this point I have also made sure that my settings in projucer for my project are identical to that of AudioPluginDemo’s. I have also given up on making a standalone and am compiling exclusively for project_VST3
After ample googling, I learn that DllMain is actually defined in juce_audio_plugin_client_VST3.cpp. Perfect; this is congruent with observations of AudioPluginDemo, which seems to have wrappers and include functions for this file in the VST3 solution. After copying the files from the JUCE module directory into my project directory (why are they not there by default if they’re integral pieces of code???), effectively copying the AudioPluginDemo_VST3 solution structure, the error seems to evolve into an error about not having vstfxstore.h. This is great, but I don’t care about VST2 and sure as hell don’t want to pay for a license, so I add JUCE_VST3_CAN_REPLACE_VST2=0 to my preprocessor definitions and be on my merry way. Except of course with this addition, a huge amount of errors occur, and on removal, the DllMain error is back - even after recreating the conditions that previously dispelled it.
Why in the lord’s name is projucer not just working out of the box? Why does it only work with the makefile? Is the VC2019 version broken? I am almost certain that my computer is fine. I’ve been trying to fix this for the better part of a day.