What is wrong with this code

Vijayadithyan .N 121 Reputation points
2022-05-07T05:55:18.257+00:00

I ported an app from C++/CX to C++/WinRT, And the basic code is this (Excluding Main()):

class DirectXApp : public IFrameworkView
{. . .};
class DirectXAppSource : IFrameworkViewSource
{
virtual IFrameworkView : CreateView()
{
return new DirectXApp();
}
}

And these 2 errors show up:
Severity Code Description Project File Line Suppression State
Error C2664 'void winrt::Windows::ApplicationModel::Core::CoreApplication::Run(const winrt::Windows::ApplicationModel::Core::IFrameworkViewSource &)': cannot convert argument 1 from 'DirectXAppSource *' to 'const winrt::Windows::ApplicationModel::Core::IFrameworkViewSource &' CoreApp

Universal Windows Platform (UWP)
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,527 questions
{count} votes