# Lots of errors in Juce library code when building with JUCE\_USE\_CUSTOM\_PLUGIN\_STANDALONE\_APP=1

**URL:** <https://forum.juce.com/t/lots-of-errors-in-juce-library-code-when-building-with-juce-use-custom-plugin-standalone-app-1/45535>\
**Category:** General JUCE discussion\
**Created:** [April 16, 2021, 8:46am UTC](https://forum.juce.com/t/lots-of-errors-in-juce-library-code-when-building-with-juce-use-custom-plugin-standalone-app-1/45535 "2021-04-16T08:46:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![benvining](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/benvining/32/9922_2.png) [@benvining](https://forum.juce.com/u/benvining)\
**Post date:** [April 16, 2021, 8:46am UTC](https://forum.juce.com/t/lots-of-errors-in-juce-library-code-when-building-with-juce-use-custom-plugin-standalone-app-1/45535/1 "2021-04-16T08:46:46Z")

</div>

Hello,

I’ve been experimenting with implementing my own version of the StandaloneFilterApp class. In my project’s CMakeLists.txt, I set JUCE\_USE\_CUSTOM\_PLUGIN\_STANDALONE\_APP=1 and added my new sources to the shared target, and in my header file I have this:

```cpp
#include <juce_audio_plugin_client/juce_audio_plugin_client.h>
#include <juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h>

extern juce::JUCEApplicationBase* juce_CreateApplication();

class StandaloneFilterApp : public juce::JUCEApplication
{
public:
    StandaloneFilterApp();

    const juce::String getApplicationName() override { return JucePlugin_Name; }
    const juce::String getApplicationVersion() override { return JucePlugin_VersionString; }
    bool moreThanOneInstanceAllowed() override { return true; }
    void anotherInstanceStarted(const juce::String&) override {}

    virtual juce::StandaloneFilterWindow* createWindow();

    void initialise(const juce::String&) override;
    void shutdown() override;
    void systemRequestedQuit() override;

private:
    juce::ApplicationProperties appProperties;
    std::unique_ptr<juce::StandaloneFilterWindow> mainWindow;
    void requestQuit() const;
};

```

when I run the build, it fails and gives me a lot of errors in the Juce library code, what appear to be undefined types:

```auto
In file included from /home/runner/work/imogen/imogen/imogen/Source/StandaloneWrapper/StandaloneWrapper.h:6,
                 from /home/runner/work/imogen/imogen/imogen/Source/StandaloneWrapper/StandaloneWrapper.cpp:1:
/home/runner/work/imogen/imogen/imogen/Builds/_deps/juce-src/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h:558:21: error: ‘deviceManager’ was not declared in this scope
  558 | deviceManager.setMidiInputDeviceEnabled (oldDevice.identifier, false);
      | ^ ~~~~~~~~~~~~
/home/runner/work/imogen/imogen/imogen/Builds/_deps/juce-src/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h:561:39: error: request for member ‘contains’ in ‘((juce::StandalonePluginHolder*)this)->juce::StandalonePluginHolder::lastMidiDevices’, which is of non-class type ‘int’
  561 | if (! lastMidiDevices.contains (newDevice))
      | ^ ~~~~~~~
/home/runner/work/imogen/imogen/imogen/Builds/_deps/juce-src/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h:562:21: error: ‘deviceManager’ was not declared in this scope
  562 | deviceManager.setMidiInputDeviceEnabled (newDevice.identifier, true);
      | ^ ~~~~~~~~~~~~
/home/runner/work/imogen/imogen/imogen/Builds/_deps/juce-src/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h: At global scope:
/home/runner/work/imogen/imogen/imogen/Builds/_deps/juce-src/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h:599:35: error: ‘AudioDeviceManager’ does not name a type
  599 | const AudioDeviceManager::AudioDeviceSetup* preferredSetupOptions = nullptr,
      | ^ ~~~~~~~~~~~~~~~~~
/home/runner/work/imogen/imogen/imogen/Builds/_deps/juce-src/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h:599:71: error: expected unqualified-id before ‘*’ token
  599 | const AudioDeviceManager::AudioDeviceSetup* preferredSetupOptions = nullptr,
      | ^
/home/runner/work/imogen/imogen/imogen/Builds/_deps/juce-src/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h:599:71: error: expected ‘)’ before ‘*’ token
  599 | const AudioDeviceManager::AudioDeviceSetup* preferredSetupOptions = nullptr,
      | ^
      | )
/home/runner/work/imogen/imogen/imogen/Builds/_deps/juce-src/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h:594:28: note: to match this ‘(’
  594 | StandaloneFilterWindow (const String& title,
      | ^

```

Did I do something wrong in setting this up, or is this an error in juce\_StandaloneFilterWindow.h?

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [April 16, 2021, 9:16am UTC](https://forum.juce.com/t/lots-of-errors-in-juce-library-code-when-building-with-juce-use-custom-plugin-standalone-app-1/45535/2 "2021-04-16T09:16:57Z")

</div>

The standalone header requires that `juce_audio_utils` has been previously included. Adding the extra include after the `juce_audio_plugin_client` include should fix the issue.

---

<div class="post-metadata">

**Author:** ![benvining](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/benvining/32/9922_2.png) [@benvining](https://forum.juce.com/u/benvining)\
**Post date:** [April 16, 2021, 5:16pm UTC](https://forum.juce.com/t/lots-of-errors-in-juce-library-code-when-building-with-juce-use-custom-plugin-standalone-app-1/45535/3 "2021-04-16T17:16:17Z")

</div>

Thank you for the info! I’m not at my computer now, but I will try this later today.

Might I suggest updating the audio\_plugin\_client module’s documentation? Last night I thought the problem might be a missing juce header, so I looked at the audio\_plugin\_client module declaration block in its header, and it lists a single dependancy of juce\_audio\_processors. But when I included that module header in my custom standalone filter header, I got these same errors.

---

<div class="post-metadata">

**Author:** ![benvining](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/benvining/32/9922_2.png) [@benvining](https://forum.juce.com/u/benvining)\
**Post date:** [April 16, 2021, 6:33pm UTC](https://forum.juce.com/t/lots-of-errors-in-juce-library-code-when-building-with-juce-use-custom-plugin-standalone-app-1/45535/4 "2021-04-16T18:33:56Z")

</div>

The build is successful with that `#include` addition. Thank you!!
