Unresolved external symbol static member FUID (DECLARE_CLASS_IID)

Hi,
I’ve a header with the following interface:

namespace Presonus 
{
struct IContextInfoProvider: Steinberg::FUnknown
{	
	virtual Steinberg::tresult PLUGIN_API getContextInfoValue (Steinberg::int32& value, Steinberg::FIDString id) = 0;
	virtual Steinberg::tresult PLUGIN_API getContextInfoString (Steinberg::Vst::TChar* string, Steinberg::int32 maxCharCount, Steinberg::FIDString id) = 0;
	
    static const Steinberg::FUID iid;
};

DECLARE_CLASS_IID (IContextInfoProvider, 0x483e61ea, 0x17994494, 0x8199a35a, 0xebb35e3c)

} // namespace Presonus 

I use it like this:

class MyEditController : public Steinberg::Vst::EditControllerEx1, public Presonus::IContextInfoHandler2
{
// ...
}

But it won’t compile, I get this error:

unresolved external symbol “public: static class Steinberg::FUID const Presonus::IContextInfoProvider::iid” (?iid@IContextInfoProvider@Presonus@@2VFUID@Steinberg@@B)

I looked at the declaration of DECLARE_CLASS_IID, and I don’t understand how it works.
DECLARE_CLASS_IID declares the member _iid as TUID instead of declaring iid as FUID.

Can anyone explain to me how DECLARE_CLASS_IID works or what’s wrong here.

Thanks.

The interface IDs must be defined once in your source code. The SDK predefined ones are in public.sdk/source/vst/vstinitiids.cpp. There you should see how it is done.

Aahh, yes you’re right. It’s a silly question, I thought DECLARE_CLASS_IID was defining the member too. I ended up doing the same thing DEF_CLASS_IID does, which I didn’t knew before. Now it works. Thanks.