Use of undeclared identifier 'kDefaultNative'

Viewed 62

I am trying to generate an audio plugin using the ASPIK SDK. I keep hitting the same stumbling block. Every time I build I get the error "Use of undeclared identifier 'kDefaultNative'" on this line in the plugingui.h file.

const PlatformType& platformType = kDefaultNative,

If I jump to definition of PlatformType, I see that the kDefaultNative is defined in iplatformcallback.h in VSTGUI.

    enum class PlatformType : int32_t {
    kHWND,      // Windows HWND
    kWindowRef, // macOS WindowRef (Carbon)
    kNSView,    // macOS NSView
    kUIView,    // iOS UIView
    kHWNDTopLevel,  // Windows HWDN Top Level (non child)
    kX11EmbedWindowID,  // X11 XID
    kGdkWindow, // GdkWindow
    
    kDefaultNative = -1 
};

I have tried to include this file in the plugingui file but I keep getting the error not found.

1 Answers

The kDefaultNative identifier is one of the values of a scoped enumeration (i.e. it's in a class enum { ... }). So, in order to use it, you need to include that class 'scope'.

So, use a line like the following:

const PlatformType& platformType = PlatformType::kDefaultNative;
Related