JUCE 5.4.2 causing errors


#1

I just updated to JUCE 5.4.2 and when I tried to rebuild my project, I received 271 errors in juce_VST3Common.h. They begin at line 180 saying “kSpeakerACN0: is not a member of Steinberg::Vst”. The same error is shown for every line from 180 - 205. What can I do to fix it?


#2

me too, but downloading the latest VST SDK fixed it.
however, it looks like they rearranged the VST2 folder, and it breaks the vst legacy. had to copy the pluginterfaces folder from the old one…


#3

You need the latest vst3 sdk. Juce has the vst3 sdk embedded, you must have an old version of the sdk in your include path somewhere.


#4

Thanks guys that was it!


#5

Btw. now it is not possible to select ‘None’ in the ‘Architectures’ field in the Linux Makefile exporter settings (both for Debug and Release). Is it intentional? I have to correct the generated makefile manually now.


#6

This was broken by e5204bafe (and not fixed by 665f1fbed) because -march=native (Native is the UI) is the default, but <None> is associated with the empty string:

I reverted 665f1fbed and e5204bafe on top of 5.4.2, rebuilt Projucer and then I was able to select <None> as on 5.4.1.

@ed95 I guess this is a corner-case that was not taken into account.


#7

Thanks @McMartin, I’ve pushed a fix here.


#8

@ed95 this is not a fix. Consider the following .jucer project:

<?xml version="1.0" encoding="UTF-8"?>

<JUCERPROJECT id="aOLQi7" name="linuxArchitecture-test" projectType="guiapp">
  <MAINGROUP id="a12zJE" name="linuxArchitecture-test">
  </MAINGROUP>
  <EXPORTFORMATS>
    <LINUX_MAKE targetFolder="Builds/LinuxMakefile">
      <CONFIGURATIONS>
        <CONFIGURATION isDebug="1" name="Debug" linuxArchitecture=""/>
        <CONFIGURATION isDebug="0" name="Release"/>
      </CONFIGURATIONS>
      <MODULEPATHS/>
    </LINUX_MAKE>
  </EXPORTFORMATS>
  <MODULES/>
</JUCERPROJECT>

when I save it with any version of Projucer before 5.4.2, the generated Makefile contains:
TARGET_ARCH := for Debug and TARGET_ARCH := -march=native for Release.

When I save it with Projucer from 5.4.2 or from develop (i.e., including your commit), the generated Makefile contains TARGET_ARCH := -march=native for both configurations.

linuxArchitecture="" was translated to TARGET_ARCH :=, now it is translated to TARGET_ARCH := -march=native, that’s a breaking change! With your commit, I can select <None> in the dropdown menu, but then the content of the .jucer changes to linuxArchitecture="none", which is not recognized by previous versions of Projucer.


#9

I think the proper fix is to:

  • revert 49359dfe348f0934af7d7827053ce85ecea61ad8
  • apply the following diff to modules/juce_data_structures/values/juce_ValueWithDefault.h:
diff --git a/modules/juce_data_structures/values/juce_ValueWithDefault.h b/modules/juce_data_structures/values/juce_ValueWithDefault.h
index d209a9501..629dbc9c0 100644
--- a/modules/juce_data_structures/values/juce_ValueWithDefault.h
+++ b/modules/juce_data_structures/values/juce_ValueWithDefault.h
@@ -121,10 +121,10 @@ public:
         }
     }

-    /** Returns true if the property does not exist or is empty. */
+    /** Returns true if the property does not exist. */
     bool isUsingDefault() const
     {
-        return ! targetTree.hasProperty (targetProperty) || targetTree.getProperty (targetProperty).toString().isEmpty();
+        return ! targetTree.hasProperty (targetProperty);
     }

     /** Removes the property from the referenced ValueTree. */

The commit title of e5204bafe949d988e9d73b3bcf99a5cb4482daad starts with Fixed some incorrect documentation in ValueWithDefault..., and that’s what it should have done: fix the documentation, not change the behavior to match it.


#10

Yes, you’re right and I’ll push a change for this shortly. Thank you for the suggestions.


#11

Also - its not compiling on Windows for me with MSDEV 2015 and its because it relies on the very latest Windows 10 SDK.

DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 is a very new #define.

And to complicate things, the latest Windows 10 SDK does not appear to be seen in Visual Studio 2015, or at least I can’t figure out how to get it to.

For now, I am going to define that missing constant and see if that works.


#12

DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 is used in juce_win32_Windowing.cpp since 68fe75742, i.e. between 5.3.2 and 5.4.0, so it’s not related to 5.4.2.

Indeed, that’s why there is this block of code:

_DPI_AWARENESS_CONTEXTS_ is not defined when building with the 8.1 SDK, so the JUCE code takes care of defining DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 itself.

@soundwarrior I tried to reproduce your issue by building the HelloWorld demo project using VS2015, targeting the 8.1 SDK, for both Win32 and x64 platforms, but it built successfully.


#13

McMartin, Thanks for checking it out. I must have something messed up on my install. For whatever reason, I can’t get Visual Studio 2015 to see the latest Windows 10 SDK - that seems to be part of the problem, I think. (=


#14

I’m unable to build with Juce 5.4.2 and VS2013. I get 21 errors starting with:

error C2264: ‘juce::PluginHostType::PluginHostType’ : error in function definition or declaration; function not called

error C2610: ‘juce::PluginHostType &juce::PluginHostType::operator =(const juce::PluginHostType &) throw()’ : is not a special member function which can be defaulted


#15

#16

One more thing (in fact in the previous versions of Projucer it was the same): shouldn’t the CodeBlocks exporter for Linux add “libcurl” to the libraries to link? I use both exporters: Makefile and CodeBlocks. All linked libraries are the same in both exporters by default except the “libcurl” which I always have to add manually later in the CodeBlocks settings.


#17

This was an issue with Projucer 5.4.1, which has been fixed in 81634a788 and then slightly improved in b20672998. Please make sure that you are using Projucer 5.4.2, not 5.4.1.


#18

Thanks, maybe I got lost due to switching between different versions of Projucer/exporters (I use different configurations for cross compiling, for normal versions etc.) I’ve to check it again.