CMake - Windows

Hey all,

I’m just trying to get started with the CMake example ‘AudioPlugin’.

So I copied the ‘AudioPlugin’ folder from the example/Cmake folder withn JUCE repo.
Then I copied the JUCE repo folder into my newly created 'AudioPlugin folder, so it exists as a sub-folder.
Then I uncommented the line in CMakeLists.txt to include JUCE as a subfolder.
Then, I would have thought that the following should suffice in the folder I created:

`cmake -G “MinGW Makefiles” .’

( followed by cmake --build . except I don’t get that far… )

I get this:

-- The C compiler identification is GNU 14.2.0
-- The CXX compiler identification is GNU 14.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/msys64/ucrt64/bin/cc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/msys64/ucrt64/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring juceaide
-- Building juceaide
CMake Error at JUCE/extras/Build/juceaide/CMakeLists.txt:142 (message):
  Failed to build juceaide

  [ 9%] Building CXX object
  extras/Build/juceaide/CMakeFiles/juceaide.dir/Main.cpp.obj

  In file included from
  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/juce_core.h:77,


                   from C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/juce_graphics.h:67,
                   from C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_gui_basics/juce_gui_basics.h:68,
                   from C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/extras/Build/juce_build_tools/juce_build_tools.h:65,
                   from C:\_LOCAL\.projects\.juce\AudioPlugin\JUCE\extras\Build\juceaide\Main.cpp:35:


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/system/juce_TargetPlatform.h:114:6:
  warning: #warning before C++23 is a GCC extension

    114 |     #warning Support for MinGW has been removed. Please use an alternative compiler.
        |      ^~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/system/juce_TargetPlatform.h:114:6:
  warning: #warning Support for MinGW has been removed.  Please use an
  alternative compiler.  [-Wcpp]

  In file included from
  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/juce_core.h:239:



  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/memory/juce_Memory.h:
  In function 'void juce::zeromem(void*, size_t)':


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/memory/juce_Memory.h:40:71:
  error: 'memset' was not declared in this scope

     40 | inline void zeromem (void* memory, size_t numBytes) noexcept        { memset (memory, 0, numBytes); }
        |                                                                       ^~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/memory/juce_Memory.h:1:1:
  note: 'memset' is defined in header '<cstring>'; this is probably fixable
  by adding '#include <cstring>'

    +++ |+#include <cstring>
      1 | /*


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/memory/juce_Memory.h:
  In function 'void juce::zerostruct(Type&)':


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/memory/juce_Memory.h:44:71:
  error: there are no arguments to 'memset' that depend on a template
  parameter, so a declaration of 'memset' must be available [-fpermissive]

     44 | inline void zerostruct (Type& structure) noexcept                   { memset ((void*) &structure, 0, sizeof (structure)); }
        |                                                                       ^~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/memory/juce_Memory.h:44:71:
  note: (if you use '-fpermissive', G++ will accept your code, but allowing
  the use of an undeclared name is deprecated)

  In file included from
  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/juce_core.h:247:



  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/text/juce_CharPointer_UTF8.h:
  In member function 'size_t juce::CharPointer_UTF8::sizeInBytes() const':


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/text/juce_CharPointer_UTF8.h:285:16:
  error: 'strlen' was not declared in this scope

    285 |         return strlen (data) + 1;
        |                ^~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/text/juce_CharPointer_UTF8.h:1:1:
  note: 'strlen' is defined in header '<cstring>'; this is probably fixable
  by adding '#include <cstring>'

    +++ |+#include <cstring>
      1 | /*


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/text/juce_CharPointer_UTF8.h:
  In member function 'juce::CharPointer_UTF8
  juce::CharPointer_UTF8::findTerminatingNull() const':


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/text/juce_CharPointer_UTF8.h:329:41:
  error: 'strlen' was not declared in this scope

    329 |         return CharPointer_UTF8 (data + strlen (data));
        |                                         ^~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/text/juce_CharPointer_UTF8.h:329:41:
  note: 'strlen' is defined in header '<cstring>'; this is probably fixable
  by adding '#include <cstring>'

  In file included from
  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/juce_core.h:250:



  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/text/juce_CharPointer_ASCII.h:
  In member function 'size_t juce::CharPointer_ASCII::length() const':


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/text/juce_CharPointer_ASCII.h:169:25:
  error: 'strlen' was not declared in this scope

    169 |         return (size_t) strlen (data);
        |                         ^~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/text/juce_CharPointer_ASCII.h:1:1:
  note: 'strlen' is defined in header '<cstring>'; this is probably fixable
  by adding '#include <cstring>'

    +++ |+#include <cstring>
      1 | /*


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/text/juce_CharPointer_ASCII.h:
  In member function 'int
  juce::CharPointer_ASCII::compare(juce::CharPointer_ASCII) const':


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/text/juce_CharPointer_ASCII.h:253:16:
  error: 'strcmp' was not declared in this scope

    253 |         return strcmp (data, other.data);
        |                ^~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/text/juce_CharPointer_ASCII.h:253:16:
  note: 'strcmp' is defined in header '<cstring>'; this is probably fixable
  by adding '#include <cstring>'


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/text/juce_CharPointer_ASCII.h:
  In member function 'int
  juce::CharPointer_ASCII::compareUpTo(juce::CharPointer_ASCII, int) const':


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/text/juce_CharPointer_ASCII.h:266:16:
  error: 'strncmp' was not declared in this scope

    266 |         return strncmp (data, other.data, (size_t) maxChars);
        |                ^~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/text/juce_CharPointer_ASCII.h:266:16:
  note: 'strncmp' is defined in header '<cstring>'; this is probably fixable
  by adding '#include <cstring>'


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/text/juce_CharPointer_ASCII.h:
  In member function 'int
  juce::CharPointer_ASCII::compareIgnoreCase(juce::CharPointer_ASCII) const':


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_core/text/juce_CharPointer_ASCII.h:281:16:
  error: 'stricmp' was not declared in this scope

    281 |         return stricmp (data, other.data);
        |                ^~~~~~~

  In file included from
  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/juce_graphics.h:147:



  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:
  In member function 'void
  juce::RenderingHelpers::EdgeTableFillers::SolidColour<PixelType,
  replaceExisting>::replaceLine(juce::PixelRGB*, juce::PixelARGB, int)
  const':


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:622:17:
  error: there are no arguments to 'memset' that depend on a template
  parameter, so a declaration of 'memset' must be available [-fpermissive]

    622 |                 memset ((void*) dest, colour.getRed(), (size_t) width * 3);   // if all the component values are the same, we can cheat..
        |                 ^~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:
  In member function 'void
  juce::RenderingHelpers::EdgeTableFillers::SolidColour<PixelType,
  replaceExisting>::replaceLine(juce::PixelAlpha*, juce::PixelARGB, int)
  const':


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:630:17:
  error: there are no arguments to 'memset' that depend on a template
  parameter, so a declaration of 'memset' must be available [-fpermissive]

    630 |                 memset ((void*) dest, colour.getAlpha(), (size_t) width);
        |                 ^~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:
  In instantiation of 'void
  juce::RenderingHelpers::EdgeTableFillers::SolidColour<PixelType,
  replaceExisting>::replaceLine(juce::PixelRGB*, juce::PixelARGB, int) const
  [with PixelType = juce::PixelRGB; bool replaceExisting = true]':


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:557:29:
  required from 'void
  juce::RenderingHelpers::EdgeTableFillers::SolidColour<PixelType,
  replaceExisting>::handleEdgeTableLine(int, int, int) const [with PixelType
  = juce::PixelRGB; bool replaceExisting = true]'

    557 |                 replaceLine (dest, p, width);
        |                 ~~~~~~~~~~~~^~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1935:79:
  required from 'void
  juce::RenderingHelpers::ClipRegions::RectangleListRegion<SavedStateType>::SubRectangleIteratorFloat::iterate(Renderer&)
  const [with Renderer =
  juce::RenderingHelpers::EdgeTableFillers::SolidColour<juce::PixelRGB,
  true>; SavedStateType =
  juce::RenderingHelpers::SoftwareRendererSavedState]'

   1935 |                                 if (clippedWidth > 0)   r.handleEdgeTableLine (clippedLeft, clippedWidth, f.topAlpha);
        |                                                         ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1501:26:
  required from 'void
  juce::RenderingHelpers::EdgeTableFillers::renderSolidFill(Iterator&, const
  juce::Image::BitmapData&, juce::PixelARGB, bool, DestPixelType*) [with
  Iterator =
  juce::RenderingHelpers::ClipRegions::RectangleListRegion<juce::RenderingHelpers::SoftwareRendererSavedState>::SubRectangleIteratorFloat;
  DestPixelType = juce::PixelRGB]'

   1501 |             iter.iterate (r);
        |             ~~~~~~~~~~~~~^~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:2487:67:
  required from 'void
  juce::RenderingHelpers::SoftwareRendererSavedState::fillWithSolidColour(IteratorType&,
  juce::PixelARGB, bool) const [with IteratorType =
  juce::RenderingHelpers::ClipRegions::RectangleListRegion<juce::RenderingHelpers::SoftwareRendererSavedState>::SubRectangleIteratorFloat]'


   2487 |             case Image::RGB:    EdgeTableFillers::renderSolidFill (iter, destData, colour, replaceContents, (PixelRGB*) nullptr); break;
        |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1806:39:
  required from 'void
  juce::RenderingHelpers::ClipRegions::RectangleListRegion<SavedStateType>::fillRectWithColour(SavedStateType&,
  juce::Rectangle<float>, juce::PixelARGB) const [with SavedStateType =
  juce::RenderingHelpers::SoftwareRendererSavedState]'

   1806 |             state.fillWithSolidColour (iter, colour, false);
        |             ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1803:14:
  required from here

   1803 |         void fillRectWithColour (SavedStateType& state, Rectangle<float> area, PixelARGB colour) const override
        |              ^~~~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:622:24:
  error: 'memset' was not declared in this scope

    622 |                 memset ((void*) dest, colour.getRed(), (size_t) width * 3);   // if all the component values are the same, we can cheat..
        |                 ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1:1:
  note: 'memset' is defined in header '<cstring>'; this is probably fixable
  by adding '#include <cstring>'

    +++ |+#include <cstring>
      1 | /*


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:
  In instantiation of 'void
  juce::RenderingHelpers::EdgeTableFillers::SolidColour<PixelType,
  replaceExisting>::replaceLine(juce::PixelRGB*, juce::PixelARGB, int) const
  [with PixelType = juce::PixelRGB; bool replaceExisting = false]':


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:557:29:
  required from 'void
  juce::RenderingHelpers::EdgeTableFillers::SolidColour<PixelType,
  replaceExisting>::handleEdgeTableLine(int, int, int) const [with PixelType
  = juce::PixelRGB; bool replaceExisting = false]'

    557 |                 replaceLine (dest, p, width);
        |                 ~~~~~~~~~~~~^~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1935:79:
  required from 'void
  juce::RenderingHelpers::ClipRegions::RectangleListRegion<SavedStateType>::SubRectangleIteratorFloat::iterate(Renderer&)
  const [with Renderer =
  juce::RenderingHelpers::EdgeTableFillers::SolidColour<juce::PixelRGB,
  false>; SavedStateType =
  juce::RenderingHelpers::SoftwareRendererSavedState]'

   1935 |                                 if (clippedWidth > 0)   r.handleEdgeTableLine (clippedLeft, clippedWidth, f.topAlpha);
        |                                                         ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1506:26:
  required from 'void
  juce::RenderingHelpers::EdgeTableFillers::renderSolidFill(Iterator&, const
  juce::Image::BitmapData&, juce::PixelARGB, bool, DestPixelType*) [with
  Iterator =
  juce::RenderingHelpers::ClipRegions::RectangleListRegion<juce::RenderingHelpers::SoftwareRendererSavedState>::SubRectangleIteratorFloat;
  DestPixelType = juce::PixelRGB]'

   1506 |             iter.iterate (r);
        |             ~~~~~~~~~~~~~^~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:2487:67:
  required from 'void
  juce::RenderingHelpers::SoftwareRendererSavedState::fillWithSolidColour(IteratorType&,
  juce::PixelARGB, bool) const [with IteratorType =
  juce::RenderingHelpers::ClipRegions::RectangleListRegion<juce::RenderingHelpers::SoftwareRendererSavedState>::SubRectangleIteratorFloat]'


   2487 |             case Image::RGB:    EdgeTableFillers::renderSolidFill (iter, destData, colour, replaceContents, (PixelRGB*) nullptr); break;
        |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1806:39:
  required from 'void
  juce::RenderingHelpers::ClipRegions::RectangleListRegion<SavedStateType>::fillRectWithColour(SavedStateType&,
  juce::Rectangle<float>, juce::PixelARGB) const [with SavedStateType =
  juce::RenderingHelpers::SoftwareRendererSavedState]'

   1806 |             state.fillWithSolidColour (iter, colour, false);
        |             ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1803:14:
  required from here

   1803 |         void fillRectWithColour (SavedStateType& state, Rectangle<float> area, PixelARGB colour) const override
        |              ^~~~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:622:24:
  error: 'memset' was not declared in this scope

    622 |                 memset ((void*) dest, colour.getRed(), (size_t) width * 3);   // if all the component values are the same, we can cheat..
        |                 ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:622:24:
  note: 'memset' is defined in header '<cstring>'; this is probably fixable
  by adding '#include <cstring>'


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:
  In instantiation of 'void
  juce::RenderingHelpers::EdgeTableFillers::SolidColour<PixelType,
  replaceExisting>::replaceLine(juce::PixelAlpha*, juce::PixelARGB, int)
  const [with PixelType = juce::PixelAlpha; bool replaceExisting = true]':


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:557:29:
  required from 'void
  juce::RenderingHelpers::EdgeTableFillers::SolidColour<PixelType,
  replaceExisting>::handleEdgeTableLine(int, int, int) const [with PixelType
  = juce::PixelAlpha; bool replaceExisting = true]'

    557 |                 replaceLine (dest, p, width);
        |                 ~~~~~~~~~~~~^~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1935:79:
  required from 'void
  juce::RenderingHelpers::ClipRegions::RectangleListRegion<SavedStateType>::SubRectangleIteratorFloat::iterate(Renderer&)
  const [with Renderer =
  juce::RenderingHelpers::EdgeTableFillers::SolidColour<juce::PixelAlpha,
  true>; SavedStateType =
  juce::RenderingHelpers::SoftwareRendererSavedState]'

   1935 |                                 if (clippedWidth > 0)   r.handleEdgeTableLine (clippedLeft, clippedWidth, f.topAlpha);
        |                                                         ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1501:26:
  required from 'void
  juce::RenderingHelpers::EdgeTableFillers::renderSolidFill(Iterator&, const
  juce::Image::BitmapData&, juce::PixelARGB, bool, DestPixelType*) [with
  Iterator =
  juce::RenderingHelpers::ClipRegions::RectangleListRegion<juce::RenderingHelpers::SoftwareRendererSavedState>::SubRectangleIteratorFloat;
  DestPixelType = juce::PixelAlpha]'

   1501 |             iter.iterate (r);
        |             ~~~~~~~~~~~~~^~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:2490:67:
  required from 'void
  juce::RenderingHelpers::SoftwareRendererSavedState::fillWithSolidColour(IteratorType&,
  juce::PixelARGB, bool) const [with IteratorType =
  juce::RenderingHelpers::ClipRegions::RectangleListRegion<juce::RenderingHelpers::SoftwareRendererSavedState>::SubRectangleIteratorFloat]'


   2490 |             default:            EdgeTableFillers::renderSolidFill (iter, destData, colour, replaceContents, (PixelAlpha*) nullptr); break;
        |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1806:39:
  required from 'void
  juce::RenderingHelpers::ClipRegions::RectangleListRegion<SavedStateType>::fillRectWithColour(SavedStateType&,
  juce::Rectangle<float>, juce::PixelARGB) const [with SavedStateType =
  juce::RenderingHelpers::SoftwareRendererSavedState]'

   1806 |             state.fillWithSolidColour (iter, colour, false);
        |             ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1803:14:
  required from here

   1803 |         void fillRectWithColour (SavedStateType& state, Rectangle<float> area, PixelARGB colour) const override
        |              ^~~~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:630:24:
  error: 'memset' was not declared in this scope

    630 |                 memset ((void*) dest, colour.getAlpha(), (size_t) width);
        |                 ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:630:24:
  note: 'memset' is defined in header '<cstring>'; this is probably fixable
  by adding '#include <cstring>'


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:
  In instantiation of 'void
  juce::RenderingHelpers::EdgeTableFillers::SolidColour<PixelType,
  replaceExisting>::replaceLine(juce::PixelAlpha*, juce::PixelARGB, int)
  const [with PixelType = juce::PixelAlpha; bool replaceExisting = false]':


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:557:29:
  required from 'void
  juce::RenderingHelpers::EdgeTableFillers::SolidColour<PixelType,
  replaceExisting>::handleEdgeTableLine(int, int, int) const [with PixelType
  = juce::PixelAlpha; bool replaceExisting = false]'

    557 |                 replaceLine (dest, p, width);
        |                 ~~~~~~~~~~~~^~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1935:79:
  required from 'void
  juce::RenderingHelpers::ClipRegions::RectangleListRegion<SavedStateType>::SubRectangleIteratorFloat::iterate(Renderer&)
  const [with Renderer =
  juce::RenderingHelpers::EdgeTableFillers::SolidColour<juce::PixelAlpha,
  false>; SavedStateType =
  juce::RenderingHelpers::SoftwareRendererSavedState]'

   1935 |                                 if (clippedWidth > 0)   r.handleEdgeTableLine (clippedLeft, clippedWidth, f.topAlpha);
        |                                                         ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1506:26:
  required from 'void
  juce::RenderingHelpers::EdgeTableFillers::renderSolidFill(Iterator&, const
  juce::Image::BitmapData&, juce::PixelARGB, bool, DestPixelType*) [with
  Iterator =
  juce::RenderingHelpers::ClipRegions::RectangleListRegion<juce::RenderingHelpers::SoftwareRendererSavedState>::SubRectangleIteratorFloat;
  DestPixelType = juce::PixelAlpha]'

   1506 |             iter.iterate (r);
        |             ~~~~~~~~~~~~~^~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:2490:67:
  required from 'void
  juce::RenderingHelpers::SoftwareRendererSavedState::fillWithSolidColour(IteratorType&,
  juce::PixelARGB, bool) const [with IteratorType =
  juce::RenderingHelpers::ClipRegions::RectangleListRegion<juce::RenderingHelpers::SoftwareRendererSavedState>::SubRectangleIteratorFloat]'


   2490 |             default:            EdgeTableFillers::renderSolidFill (iter, destData, colour, replaceContents, (PixelAlpha*) nullptr); break;
        |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1806:39:
  required from 'void
  juce::RenderingHelpers::ClipRegions::RectangleListRegion<SavedStateType>::fillRectWithColour(SavedStateType&,
  juce::Rectangle<float>, juce::PixelARGB) const [with SavedStateType =
  juce::RenderingHelpers::SoftwareRendererSavedState]'

   1806 |             state.fillWithSolidColour (iter, colour, false);
        |             ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:1803:14:
  required from here

   1803 |         void fillRectWithColour (SavedStateType& state, Rectangle<float> area, PixelARGB colour) const override
        |              ^~~~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:630:24:
  error: 'memset' was not declared in this scope

    630 |                 memset ((void*) dest, colour.getAlpha(), (size_t) width);
        |                 ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


  C:/_LOCAL/.projects/.juce/AudioPlugin/JUCE/modules/juce_graphics/native/juce_RenderingHelpers.h:630:24:
  note: 'memset' is defined in header '<cstring>'; this is probably fixable
  by adding '#include <cstring>'

  mingw32-make[2]: ***
  [extras\Build\juceaide\CMakeFiles\juceaide.dir\build.make:76:
  extras/Build/juceaide/CMakeFiles/juceaide.dir/Main.cpp.obj] Error 1

  mingw32-make[1]: *** [CMakeFiles\Makefile2:130:
  extras/Build/juceaide/CMakeFiles/juceaide.dir/all] Error 2

  mingw32-make: *** [Makefile:135: all] Error 2



-- Configuring incomplete, errors occurred!

What am I doing wrong?

I have CMake and MinGW (via MSYS) installed and up-to-date.

I did pretty much the exact same thing on Linux (manjaro) and the build succeeded, although (predictably I suppose) it only builds a Linux plugin.

I’d like to be able to buld a Windows VST3 without having to resort to installing Visual Studio. Surely there’s a way to do that on windows, I thought that’s what the CMake examples were for?

I am afraid MinGW is no longer supported:

1 Like

Thanks for pointing that out!

just for clarity: does this mean Visual Studio is now the only way to build on Windows (and the CMake examples are no longer relevant for Windows) ?

No. For one, you can use CMake with Visual Studio. But also, last I checked, Clang + Ninja works on Windows

1 Like

Great, I’ll look into those. Very new to all this!

1 Like

Actually, now that I’ve looked into it and experimented a bit… It looks like clang will work as a cmake generator, but only if you have msvc build tools. I’ve tried installing the Windows SDK and linking manually, but there are still missing libs and it looks like msvc build tools at least is a pre-requisite, which isn’t much far off from just installing Visual Studio anyway.

I’d be very interested to know if anyone can tell me if there’s another way?

Why wouldn’t you just install Visual Studio? You can turn off some unneeded options during install.

In the end, I probably will!
I just think it’s overkill for C++ compiling… but I guess that’s how it is with Microsoft.
It was so much more simple and a much lighter toolchain on Linux!

I agree with you apropos lighter tooling on Linux.

For sure, you can do JUCE development with small and light tools. I often use vim and cmake for small JUCE apps on Linux as well as MacOS, JUCE has become my multi-platform C++ Framework of choice, although the bigger these toy apps get, the sooner they migrate to CLion …

However, you made some kinda clumsy mistakes:

So I copied the ‘AudioPlugin’ folder from the example/Cmake folder withn JUCE repo.

Better idea is to first set up your own repo, with JUCE as a submodule, like this:

SomeAwesomeProject
├── CMakeLists.txt
├── Source
│   ├── PluginProcessor.h
│   ├── PluginEditor.h
│   └── CustomComponent.h
└── modules
    └── JUCE

So, you’d do something like this at first:

$ mkdir SomeAwesomeProject/ && cd SomeAwesomeProject
$ git init . && mkdir -p Source/ modules/
$ git submodule add https://github.com/juce-framework/JUCE.git modules/JUCE

… and then edit the CMakeLists.txt file, add the sources you want in Source/ - for example from the AudioPlugin example, which you manually copy into your repo, and then refactor the code to match your CMakeLists.txt.

Then I copied the JUCE repo folder into my newly created 'AudioPlugin folder, so it exists as a sub-folder.

This is better done with CMake, honestly. You can do it a couple of ways - if you are comfortable maintaining JUCE as a submodule of your project, then just add_subdirectory(modules/JUCE) should suffice - but if you want only to include JUCE during the build step, you can also do either of these options:

include(FetchContent)
# Case A: Point to the local dev-maintained git submodule
FetchContent_Declare(juce SOURCE_DIR ${CMAKE_SOURCE_DIR}/modules/JUCE)
 
# Case B: Or get it from github when eneded:
FetchContent_Declare(juce GIT_REPOSITORY https://github.com/juce-framework/JUCE.git GIT_TAG master)

# .. and then (both cases):
FetchContent_MakeAvailable(juce)

But about Linux tooling: here’s the good news: if you use CLion, you can use it on all platforms (MacOS/Linux/Windows) and it is a superlative solution to the CMake ecosystem.

I’ve been a die-hard Linux user since the beginning, but yet found CLion well worth the investment, since … it Just Plain Works™ on all the platforms, especially with well-worked CMake projects such as JUCE, Tracktion, and so on …

Just sayin’.

1 Like

Thanks ibisum, this is great info.

In terms of an IDE, I recall you mentioned CLion in my other thread about getting started on Linux. I checked it out and it looked a lot less ‘heavy’ than VS for sure.

Since then, I’ve moved from Debian to Manjaro so haven’t got to the point of setting up CLion yet.

It’s such early days for me with JUCE and audio plugins (which is what I plan to be doing), that I just thought the simplicity of VScode and terminal-based builds would suit me for now. Certainly, on Linux that’s fine for now.

When it comes to Windows – If you’re saying that CLion includes a compiler that works without the need for msvc build tools, that would be great to know.

At the moment, I’ve managed to install msvc tools only (still, taking up 6GB!), and can now build with the developer terminal that comes with it.

But I will definitely have a look at your instructions and try to sort out my repo properly, many thanks!

Well folks, for what it’s worth to those wanting a very quick ‘test’ setup on Windows with Cmake, I’ve figured out the most painless way from a ‘bare’ Windows setup with no dev tools installed. (except a portable version of VSCode). Have tested this on both W10 and W11.

As per ibisum’s comments above, this definitely isn’t the right way to do it, but is rather my ‘clumsy’ (but quick) way of making sure I have an environment that can compile JUCE audio plugins specifically.

[ install cmake ]

(first, install chocolatey)

  1. Open PowerShell as Administrator.
  2. Run the following command:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString(‘https://community.chocolatey.org/install.ps1’))

This will download and install Chocolatey on your system.

  1. In the same powershell terminal, run:

choco install cmake

[ download ninja ]

  1. unzip the archive, extract ‘ninja.exe’ to a convenient location, e.g. c:\ninja
  2. add that location to path environment variable

[ install VS_2022_build tools ]

  1. download offline installer:
    https://github.com/AudioBabbL/Visual-CPP-Build-Tools-OFFLINE-installer

  2. Extract the archives into a folder, then run the cmd installer - OR - run cmd.exe in root of folder and do:

    vs_BuildTools.exe --noWeb

(at the time of writing, this works as a rather easier alternative to dealing with MS web installer. In time I’m sure it will become obsolete, but for now it works)

[ test build audio plugin ]

  1. create folder, open with VSCODE
  2. extract JUCE into folder
  3. copy examples/CMake/AudioPlugin contents into top level
  4. ( in VSCODE ) modify CMakeLists.txt to include: add_subdirectory(JUCE)
  5. ( in x64 Native VS_2022 terminal ) > cd [path to project directory]
    run cmake commands:

    cmake -G Ninja .
    cmake --build .

‘AudioPluginExample_artefacts’ folder should now contain working plugins.

Just leaving this here as an example. I know it looks rather ‘unofficial’ and even a bit ‘hacky’, but it works.

My next steps will be getting familiar with rolling my own CMakelists.txt, using git version control and, hopefully, integrating with VSCode since I’m still not convinced I need a full-blown IDE at this time.

1 Like

After a few hours fruitlessly trying to integrate debugging in VSCode, I’ve given up!

The main crux of the problem seems to be that if I want VS build tools to work, I have to run them through the “x64 Native Tools Command Prompt” that comes with VS Tools. All attempts to get powershell to run the same environment have failed.

The only option seems to be to run VSCode from the x64 Native Tools command prompt, but that’s rather cumbersome to be honest. Besides this, I’ve come to realize that setting up the toolchain for the project in VSCode is a bit of a pain as well.

So, once again ibisum, I have to thank you for talking absolute sense:

you were right, it’s true that Clion Just Plain Works™ !

There were literally just two things to do:

  1. Open the project folder in Clion, then choose ‘Visual Studio’ as the toolchain in the Open project Wizard
    (Cmake project will load, basically doing the equivalent of ‘cmake -G Ninja build .’ in the background)
  2. Debug (Shift_F9), to run the default target (in my case with the audio plugin example, this is the ‘standalone’) - OR - Debug… (Shift+Alt_F9) to choose a target, for example the VST3

It’s really that simple. The only thing left to do now is choose Reaper as the plugin host, and I can actually start coding something!

Nice work, glad you pushed through to gain a good understanding of things… good luck with doing some actual development! :slight_smile:

1 Like