Can't get juceaide to build on Windows

Hi,

for some reason I can’t generate any Juce project with CMake because juceaide keeps failing to build.

Please see the corresponding output below, which is always the same:

  ~  Desktop  JUCE  build   master ≣  cmake .. -G "Visual Studio 14 Win64"
-- Selecting Windows SDK version  to target Windows 10.0.19042.
-- The C compiler identification is MSVC 19.0.23026.0
-- The CXX compiler identification is MSVC 19.0.23026.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.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:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring juceaide
-- Building juceaide
CMake Error at extras/Build/juceaide/CMakeLists.txt:86 (message):
  Failed to build juceaide

  Microsoft (R)-Buildmodul, Version 14.0.23107.0

  Copyright (C) Microsoft Corporation.  Alle Rechte vorbehalten.



    Checking Build System
    Building Custom Rule C:/Users/domin/Desktop/JUCE/extras/Build/juceaide/CMakeLists.txt
    Main.cpp
    juce_build_tools.cpp
    juce_gui_basics.cpp
    juce_graphics.cpp
    juce_events.cpp
    juce_core.cpp

  C:\Users\domin\Desktop\JUCE\extras\Build\juceaide\Main.cpp(500): error
  C2899: typename cannot be used outside a template declaration
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]


    juce_data_structures.cpp


  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(483):
  error C4579: 'juce::var::Instance::attributesVoid': in-class initialization
  for type 'const juce::var::VariantType' is not yet implemented; static
  member will remain uninitialized at runtime but use in constant-expressions
  is supported (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]



  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(484):
  error C4579: 'juce::var::Instance::attributesUndefined': in-class
  initialization for type 'const juce::var::VariantType' is not yet
  implemented; static member will remain uninitialized at runtime but use in
  constant-expressions is supported (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]



  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(485):
  error C4579: 'juce::var::Instance::attributesInt': in-class initialization
  for type 'const juce::var::VariantType' is not yet implemented; static
  member will remain uninitialized at runtime but use in constant-expressions
  is supported (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]



  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(486):
  error C4579: 'juce::var::Instance::attributesInt64': in-class
  initialization for type 'const juce::var::VariantType' is not yet
  implemented; static member will remain uninitialized at runtime but use in
  constant-expressions is supported (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]



  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(487):
  error C4579: 'juce::var::Instance::attributesBool': in-class initialization
  for type 'const juce::var::VariantType' is not yet implemented; static
  member will remain uninitialized at runtime but use in constant-expressions
  is supported (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]



  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(488):
  error C4579: 'juce::var::Instance::attributesDouble': in-class
  initialization for type 'const juce::var::VariantType' is not yet
  implemented; static member will remain uninitialized at runtime but use in
  constant-expressions is supported (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]



  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(489):
  error C4579: 'juce::var::Instance::attributesMethod': in-class
  initialization for type 'const juce::var::VariantType' is not yet
  implemented; static member will remain uninitialized at runtime but use in
  constant-expressions is supported (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]



  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(490):
  error C4579: 'juce::var::Instance::attributesArray': in-class
  initialization for type 'const juce::var::VariantType' is not yet
  implemented; static member will remain uninitialized at runtime but use in
  constant-expressions is supported (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]



  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(491):
  error C4579: 'juce::var::Instance::attributesString': in-class
  initialization for type 'const juce::var::VariantType' is not yet
  implemented; static member will remain uninitialized at runtime but use in
  constant-expressions is supported (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]



  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(492):
  error C4579: 'juce::var::Instance::attributesBinary': in-class
  initialization for type 'const juce::var::VariantType' is not yet
  implemented; static member will remain uninitialized at runtime but use in
  constant-expressions is supported (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]



  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(493):
  error C4579: 'juce::var::Instance::attributesObject': in-class
  initialization for type 'const juce::var::VariantType' is not yet
  implemented; static member will remain uninitialized at runtime but use in
  constant-expressions is supported (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]



  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(483):
  error C2512: 'juce::var::VariantType': no appropriate default constructor
  available (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]


    c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(41): note: see declaration of 'juce::var::VariantType' (compiling source file C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)


  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(484):
  error C2512: 'juce::var::VariantType': no appropriate default constructor
  available (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]


    c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(41): note: see declaration of 'juce::var::VariantType' (compiling source file C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)


  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(485):
  error C2512: 'juce::var::VariantType': no appropriate default constructor
  available (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]


    c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(41): note: see declaration of 'juce::var::VariantType' (compiling source file C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)


  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(486):
  error C2512: 'juce::var::VariantType': no appropriate default constructor
  available (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]


    c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(41): note: see declaration of 'juce::var::VariantType' (compiling source file C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)


  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(487):
  error C2512: 'juce::var::VariantType': no appropriate default constructor
  available (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]


    c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(41): note: see declaration of 'juce::var::VariantType' (compiling source file C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)


  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(488):
  error C2512: 'juce::var::VariantType': no appropriate default constructor
  available (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]


    c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(41): note: see declaration of 'juce::var::VariantType' (compiling source file C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)


  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(489):
  error C2512: 'juce::var::VariantType': no appropriate default constructor
  available (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]


    c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(41): note: see declaration of 'juce::var::VariantType' (compiling source file C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)


  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(490):
  error C2512: 'juce::var::VariantType': no appropriate default constructor
  available (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]


    c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(41): note: see declaration of 'juce::var::VariantType' (compiling source file C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)


  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(491):
  error C2512: 'juce::var::VariantType': no appropriate default constructor
  available (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]


    c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(41): note: see declaration of 'juce::var::VariantType' (compiling source file C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)


  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(492):
  error C2512: 'juce::var::VariantType': no appropriate default constructor
  available (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]


    c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(41): note: see declaration of 'juce::var::VariantType' (compiling source file C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)


  c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(493):
  error C2512: 'juce::var::VariantType': no appropriate default constructor
  available (compiling source file
  C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)
  [C:\Users\domin\Desktop\JUCE\build\tools\extras\Build\juceaide\juceaide.vcxproj]


    c:\users\domin\desktop\juce\modules\juce_core\containers/juce_Variant.cpp(41): note: see declaration of 'juce::var::VariantType' (compiling source file C:\Users\domin\Desktop\JUCE\modules\juce_core\juce_core.cpp)



-- Configuring incomplete, errors occurred!
See also "C:/Users/domin/Desktop/JUCE/build/CMakeFiles/CMakeOutput.log".

Any kind of help would be greatly appreciated!

Thanks for reporting, this looks like it’s probably a compatibility issue with VS 2015. I’ll update this thread once I find a fix for the issue.

I’m struggling to reproduce the issue, unfortunately. Could you provide some more details about how you’re generating the project? Which shell are you using (git bash, powershell, cmd, developer command prompt etc.)? What’s your CMake version? Which version of JUCE are you using?

If you’re not currently using the most recent release of VS2015, could you try updating to the most recent version and reconfiguring the project?

On my install, the detected MSVC version is MSVC 19.0.24215.1 so perhaps newer versions contain C++ conformance fixes.

Thanks for looking into this.

Some Info abouit what I tried to generate with:

  • tested this with a freshly cloned Juce repo (both master and develop branch)
  • shells: powershell, cmd, developer cmd (VS2015)
  • IDEs with Cmake support: Visual Studio 2019 and VSCode + CMake Tools extension
  • CMake: version is now 3.20.4, but I also tested with 3.12.x
    all yield the same result

I’m installing and update to VS2015 right now to see if that does anything.

I tried uninstalling VS2015 Update 3 and installing the original distribution of VS2015, and I’m now able to reproduce the problem. I have a potential fix, but it makes the code a bit more untidy. Additionally, I ran into more problems (including internal compiler errors) when trying to build some of the example projects from the JUCE repository. I need to discuss with the team how much work we want to put into supporting this particular version of VS2015.

I’ll update this thread if the fixes end up getting merged, but I’d strongly recommend updating to the newest compiler possible in the meantime as newer versions seem to have added a great deal of stability and quality improvements over older versions.

This is good news.

I wasn’t able to install VS2015 Update 3 properly on my machine yet, due to some errors. This is a different problem with my setup I have to fix (there is no actual requirement on my side to use an older version of VS2015). But now I know the path foward and why juceaide isn’t building. So thanks a lot for checking this :slight_smile: .

Small update:

Using VS2019 as the Generator and specifying the VS2015 toolset works just fine:

cmake .. -G "Visual Studio 16 2019" -T "v140"