Hi All,
I have one simple XAML page with it's .CPP and .h related files, and I want to create one property strongly typed as one enum to use inside and outside this class, so it should be public, but when I compile the code I got some errors.
Part of my code on the .h file is:
"namespace MyApp
{
enum class MyEnum
{
Value 1,
Value 2,
Value 3
};
public ref class MyPage sealed
{
public:
MyPage();
~MyPage();
property MyEnum MyContext
{
MyEnum get();
void set
(MyEnum value);
}
private:
Windows::Foundation::EventRegistrationToken _displayHandlerToken;
…
"
And the error I got was:
"Error 1 error
LNK2001: unresolved external symbol "public: enum ..."
How can I make this enum public and use as I need? What would be the best approach?