[Request] Change the default option for "Runtime Library" on Release configurations for VS exporters to use the STATIC runtime

One of my users has alerted me to the fact that my plug-ins can’t be used by users who do not have the VS C++ runtime DDLs on their systems because my plug-ins depend on the DLL.

This wasn’t something I hadn’t paid any thought to since I’d assumed the Projucer would set up the release configuration propery for a full comercial release, but upon inspection the Runtime Library option for the Release configuration for Visual Studio is set to Default (Use DLL runtime).

Can we please change the default option for release builds to use a STATIC runtime instead so that plug-ins built under these settings don’t depend on the C++ runtime?

Juce/Roli follows Microsoft’s official, insufferable, recommendation to use the DLL runtimes.

Maybe a solution would be to have a global setting in Projucer to set the default runtime library type.

Depending on what versions of Windows you want to support, it’s better to use the dynamic linking option (the default in JUCE). See how it affects the number of plugins a user can run simultaneously on older versions of Windows here:

I don’t think that for the latest and greatest version of Windows 10 this is relevant anymore, but if you want to serve Windows 7, 8, or older versions of Win10, it’s probably still relevant.

You can include the runtime dlls in your installer to install it automatically, or supply the redistributable that comes with Visual Studio and ask your users to run it.

1 Like

Please, no more global settings. This makes it very difficult to build projects consistently on CI.


It doesn’t take long to create a script that duplicates a template and replaces all the pertinent parts for you. This is the list of replacements that I have in my own BASH script on macOS:

PROJECTID=`cat /dev/random | LC_CTYPE=C tr -dc "[:alpha:]" | head -c 6`

sed -i '' "s/{{mainId}}/$PROJECTID/g;" template.jucer
sed -i '' "s/{{pluginName}}/$PLUGIN_NAME/g;" template.jucer
sed -i '' "s/{{copyrightYear}}/$COPYRIGHT_YEAR/g;" template.jucer
mv template.jucer "${PLUGIN_NAME}.jucer"

sed -i '' "s/{{AudioProcessor}}/$PROCESSOR_NAME/g;" Source/PluginProcessor.*
sed -i '' "s/{{AudioProcessor}}/$PROCESSOR_NAME/g;" Source/gui/PluginEditor.*

sed -i '' "s/{{AudioProcessorEditor}}/$EDITOR_NAME/g;" Source/PluginProcessor.*
sed -i '' "s/{{AudioProcessorEditor}}/$EDITOR_NAME/g;" Source/gui/PluginEditor.*

sed -i '' "s/{{pluginName}}/$PLUGIN_NAME/g;" Source/PluginProcessor.*
sed -i '' "s/{{pluginName}}/$PLUGIN_NAME/g;" Source/gui/PluginEditor.*
sed -i '' "s/{{pluginName}}/$PLUGIN_NAME/g;" Installers/build_scripts/build_*.sh
sed -i '' "s/{{pluginName}}/$PLUGIN_NAME/g;" Installers/*.iss
sed -i '' "s/{{pluginName}}/$PLUGIN_NAME/g;" Installers/License.rtf
sed -i '' "s/{{pluginName}}/$PLUGIN_NAME/g;" azure-pipelines.yml
sed -i '' "s/{{pluginName}}/$PLUGIN_NAME/g;" .gitignore

sed -i '' "s/{{copyrightYear}}/$COPYRIGHT_YEAR/g;" Source/PluginProcessor.*
sed -i '' "s/{{copyrightYear}}/$COPYRIGHT_YEAR/g;" Source/gui/PluginEditor.*
sed -i '' "s/{{copyrightYear}}/$COPYRIGHT_YEAR/g;" Installers/License.rtf

sed -i '' "s/{{GUID}}/$GUID/g;" Installers/*.iss

one thing I did notice is that it doesn’t matter about ids in the JUCER for the <FILE>s themselves being duplicated across projects as long as you don’t have multiple JUCER projects open at the same time, it can get a bit confused in that case.

// example template.jucer snippet

<JUCERPROJECT id="{{mainId}}" name="{{pluginName}}" ... etc etc...

  <MAINGROUP id="dGD41u" name="{{pluginName}}">
    <GROUP id="{C22B92C2-7C8E-F5B9-2539-20F017D4188A}" name="Source">
      <GROUP id="{675715BB-56D3-2C97-F2B2-FEFA264E1389}" name="gui">
        <FILE id="Lee976" name="PluginEditor.cpp" compile="1" resource="0"
        <FILE id="O6UAjA" name="PluginEditor.h" compile="0" resource="0"
      <FILE id="nvbbM9" name="PluginProcessor.cpp" compile="1" resource="0"
      <FILE id="RQkBUr" name="PluginProcessor.h" compile="0" resource="0"
... etc etc ...

Like this you set up your own ideal default template and everyone’s a winner :smiley: