I'm new to some boost feature and I'm facing some issues trying to cast a reference to boost::any to a reference to a custom class (for now it's empty, I'm still figuring out the content of the class).
Shortly, I have:
class MyClass
{
public:
MyClass();
~MyClass();
private:
}
MyClass function(boost::any &source)
{
if (source.type() == typeid(MyClass))
return boost::any_cast<MyClass>(source);
}
I've not implemented yet the constructors and destructor, so they're still the default ones.
While compiling (in Visual Studio 2017) I get the following message:
Severity Code Description Project File Line Suppression State Error LNK2001 unresolved external symbol "public: __thiscall MyClass::~MyClass(void)" (??1MyClass@@$$FQAE@XZ) NativeToManagedBridge C:\bridge_library\testCli_sources\NativeToManagedBridge\anyHelper.obj 1