Slider class not recognized in JUCE6?

I’m on Ubuntu 18.04, using the JUCE6 preview (so that I can build VST3). Following this early tutorial:

https://docs.juce.com/master/tutorial_code_basic_plugin.html

I get the error

error: ‘Slider’ does not name a type; did you mean ‘fwide’?

after adding the line

Slider midiVolume;

to the PluginEditor header file.

Any idea why this would be the case? I did see something about removing the need for including the JUCE header files, and this file still has

#include <JuceHeader.h>

at the top, though I’m too much of a noob to know if it’s related. If I remember correctly, last time I went through this tutorial (before switching to juce6) it worked fine.

Thanks for any help, and please feel free to let me know if there’s any more information I should provide.

I guess this is related to the JuceHeader.h generated by Projucer in JUCE 6 not doing using namespace juce; by default anymore. Instead of Slider midiVolume;, you should write juce::Slider midiVolume;.

Thanks for the reply! Adding “juce::” in front of “Slider” (both in the declaration, and in the statements added to the PluginEditor constructor where some Slider class functions are used) leaves me with this error in PluginProcessor.cpp:

In member function ‘virtual const juce::String TutorialPluginAudioProcessor::getName() const’:
error: ‘TutorialPlugin’ was not declared in this scope

I’m afraid this one has me stumped too.

The tutorials aren’t compatible with JUCE 6 yet, so you’ll need to be on either the master or develop branch to compile them. When JUCE 6 is released the tutorial projects will be updated too.

Thanks very much for your help. I moved to JUCE 6 because someone recommended it in order to be able to load my own plugins into the AudioPluginHost (so that I can take advantage of debugging options). Do you know if there’s any way to get that to work on Linux on the current master or develop branches? Right now I get

Note that the following files appeared to be plugin files, but failed to load correctly: plugin_name.so

when trying to add my plugins to the AudioPluginHost’s list with JUCE 5.4.7.

I do have the VST2 SDK to use until JUCE 6 is officially merged, if that helps.

Thanks again for any help or advice.

Linux VST3 support is only available on the juce6 branch at the moment, but you can build VST2s and load them in the AudioPluginHost if you have a copy of the VST2 SDK. Make sure that the path to your copy of the VST2 SDK is set in the Projucer’s global paths via the File->Global Paths... menu item and under the “VST (Legacy) SDK” field. You’ll also need to enable the JUCE_PLUGINHOST_VST flag in the juce_audio_processors module and re-save the AudioPluginHost project as it is disabled by default. Then rebuild the AudioPluginHost and your plug-ins and you should be able to load VST2s correctly.