Noise Gate example won't build on M1 MacBook Air

Hi chaps - I’ve been having trouble building the standalone of various plugins, including the Noise Gate example. AU and VST3 generally build fine, but with the standalone, sometimes (but not always!) I get the error:-

Undefined symbols for architecture arm64:
  "_main", referenced from:
     implicit entry/start for main executable
     (maybe you meant: juce::jpeglibNamespace::jinit_c_main_controller(juce::jpeglibNamespace::jpeg_compress_struct*, unsigned char), juce::jpeglibNamespace::jinit_d_main_controller(juce::jpeglibNamespace::jpeg_decompress_struct*, unsigned char) )
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I’m assuming I have something wrong in Xcode build settings? I’m on an M1 MacBook Air, running Monterey 12.4 and Xcode 13.4.1 with the latest version of June.

Any suggestions would be most welcome!