VST3 for Win64 often not working on other machines

Hello, I’m trying to convert my emulator to a JUCE plugin in order to be able to build a VST3.

I already did that here - midiverb_emulator/MidiverbPlugin at main · thement/midiverb_emulator · GitHub - it builds and it works on my machine (I have a Win10 x64 machine with Microsoft Visual Studio, it loads fine into Ableton and Reaper). However when I distribute the zipped vst3 (MidiverbPlugin.vst3) users often report that it doesn’t work on their machine (when loaded to Reaper or VCVRack, also Win10 x64). For example the VCVRack “HOST FX” reports

Could not initialize plugin "/Midiverb Emulator.vst3".

LoadLibrary failed.

Any ideas what I’ve might missed or what to check out? I tried to load it in Reaper and it works fine, so I was thinking maybe it’s some code signing issue?

Thanks in advance!

There might be multiple reasons. It seems that your CMake file does not have anything related to static linking. Perhaps you can add it first to see whether it works or not?

Without code-signing the OS will give warnings, but Could not initialize plugin "/Midiverb Emulator.vst3". is not because of code-signing (on Windows).

if (WIN32)
    set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" CACHE INTERNAL "")
endif ()
1 Like

Yes, that was it! Thank you.

For future reference, what I added was:

if (MSVC)
set(CMAKE_MSVC_RUNTIME_LIBRARY “MultiThreaded$<$CONFIG:Debug:Debug>”)
endif()

right before include(FetchContent).

I was also not doing a release build. I should’ve run it as: cmake --build . --config Release