I’ve been compiling the Windows version of my plug-in with Visual Studio 2022 v17.4.3. Two days ago, I absentmindedly upgraded to the latest version of Visual Studio: v17.10.2. After compilation, the resulting plug-in ran fine on my development machine, but wouldn’t start at all on my other Windows machines. Users confirmed this. On most (or all?) other machines, the standalone would exit immediately without error messages, and the VST version of the plug-in refused to detect in any hosts. I tried building a vanilla JUCE GUI app (not even a plug-in), and I got the same behavior. I tried a JUCE console app and it worked. I tried a non-JUCE MFC Windows app and that worked fine on any machine I tested them on. I tried compiling using different versions of JUCE (7.0.6, 7.0.9, 7.0.12, and 8.0.0) and nothing made any difference. After two days of pulling my hair out, I reverted back to VS 17.4.3 and my builds worked again.
Anyone have any theories about what might have caused this?
Sounds to me like you’re using dynamic linking for the runtime libraries, and your other machines don’t have the DLL required to run your plugin. We use static runtime libraries so that we don’t have to deal with updating users’ system DLLs when we update the version of the libraries we build with. Another option, if I recall, would be to link to an older version of the runtime libraries. (I forget how to do that, though, sorry.)
I have seen similar things on Github hosted runner recently (they switch VS from 17.9.34902.65 to 17.10.34928.147). The plugin passes all tested on the runner but won’t open locally.
Yes, I have just checked (BTW I am not familiar with Windows maybe there is something tricky). I have also downloaded the installer from pamplejuce (latest action). I cannot open it either
I have just reinstalled MSVC and it works. Don’t know why Still too new to Windows.
I encountered a similar issue on an older version of Windows 11 running on a Virtual Machine. JUCE apps compiled with the latest version of Visual Studio would close immediately upon starting without displaying any error messages. Installing the latest Microsoft Visual C++ Redistributable fixed the problem for me. Since the VM didn’t have Visual Studio installed, it was missing the latest Visual C++ Redistributable.
If an app is crashing immediately upon starting, check the Event Viewer for Application Crashing Events to get more information about the possible cause.
Edit: The app I was testing had the Runtime Library option set to Use DLL Runtime in Projucer, which is the default. Setting this option to Use static runtime will avoid any Visual C++ Redistributable runtime errors.
Ack! All this time I was under the impression that I was linking statically, but it seems I wasn’t. I haven’t tried a rebuild as static yet, but I’m pretty sure it will fix the issue. Thanks everyone.