`'Synth\""' is not recognized as an internal or external command` in JUCE 6

I’ve just moved my JUCE 5 code over to JUCE 6, and I’m trying to build, but I get the error:

‘Synth""’ is not recognized as an internal or external command

When I pass IS_SYNTH TRUE to juce_add_plugin.

Setting IS_SYNTH to false results in a different error:

failed to find a compatible input configuration

I assume because my plugin actually is a synth.

It’s difficult to say what the problem might be without seeing more of the CMakeLists. Is it possible that you have an unmatched quotation mark or parenthesis somewhere in the file?

I tested with my plugin (based off of the JUCE 6/examples/Cmake template - this error only occurs when flipping FALSE to TRUE.

To make sure, I downloaded one of @eyalamir’s templates, and ran built PluginWithCustomModule (standlone) - same error. This uses a freshly downloaded juce install as well, so It cant be my juce config.

It’s just been confirmed that It only builds with -G Ninja

Which generator were you using previously? It sounds like cmake is failing to properly escape some string when generating the project.

None

I get the same error

'Synth\""' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe' : return code '0xff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.

with
juce_add_plugin("{BaseTargetName}" # VERSION ... # ICON_BIG ... # ICON_SMALL ... COMPANY_NAME "MyCompany" IS_SYNTH TRUE NEEDS_MIDI_INPUT TRUE NEEDS_MIDI_OUTPUT FALSE IS_MIDI_EFFECT FALSE EDITOR_WANTS_KEYBOARD_FOCUS FALSE COPY_PLUGIN_AFTER_BUILD {postBuild}
PLUGIN_MANUFACTURER_CODE Juce
PLUGIN_CODE Dem0
FORMATS AU VST3 Standalone
PRODUCT_NAME “Audio Plugin Example”)

I’m using CLion with a visual studio clang-cl.exe toolchain

As far as I can tell, this error occurs when using more than one VST3 category. We ask CMake to add the definion JucePlugin_Vst3Category="Instrument|Synth" to the VST3 target. Unfortunately, CMake doesn’t escape the | symbol properly for the NMake generator, so it’s interpreted incorrectly, and the shell assumes we’re trying to pipe to a command named Synth\".

As suggested above, I’d recommend using the Ninja generator instead. You can download Ninja here, put it somewhere on your PATH, and then add -G Ninja to the CMake configuration options in CLion.