error LNK2019 for WML (Windows Machine Learning) project

  • Thread starter Thread starter flaviu_
  • Start date Start date
F

flaviu_

Guest
I have taken from here: microsoft/Windows-Machine-Learning code and I put in a MFC project. Of course, I added proper VS2017 extensions:

1613663.png


The problem is when I compile the project:

error LNK2019: unresolved external symbol _WINRT_GetRestrictedErrorInfo@4 referenced in function "public: __thiscall winrt::hresult_error::hresult_error(struct winrt::hresult,struct winrt::hresult_error::from_abi_t)" (??0hresult_error@winrt@@QAE@Uhresult@1@Ufrom_abi_t@01@@Z)
error LNK2019: unresolved external symbol _WINRT_RoGetActivationFactory@12 referenced in function "__cdecl winrt::get_activation_factory<struct winrt::Windows::Foundation::IActivationFactory>(struct winrt::param::hstring const &)" (??$get_activation_factory@UIActivationFactory@Foundation@Windows@winrt@@@winrt@@YA@ABUhstring@param@0@@Z)
error LNK2019: unresolved external symbol _WINRT_RoOriginateLanguageException@12 referenced in function "private: void __thiscall winrt::hresult_error::originate(struct winrt::hresult,void *)" (?originate@hresult_error@winrt@@AAEXUhresult@2@PAX@Z)
error LNK2019: unresolved external symbol _WINRT_SetRestrictedErrorInfo@4 referenced in function "public: struct winrt::hresult __thiscall winrt::hresult_error::to_abi(void)const " (?to_abi@hresult_error@winrt@@QBE?AUhresult@2@XZ)
error LNK2019: unresolved external symbol _WINRT_WindowsCreateString@12 referenced in function "void * __cdecl winrt::impl::create_string(wchar_t const *,unsigned int)" (?create_string@impl@winrt@@YAPAXPB_WI@Z)
error LNK2019: unresolved external symbol _WINRT_WindowsCreateStringReference@16 referenced in function "public: __thiscall winrt::param::hstring::hstring(class std::basic_string_view<wchar_t,struct std::char_traits<wchar_t> > const &)" (??0hstring@param@winrt@@QAE@ABV?$basic_string_view@_WU?$char_traits@_W@std@@@std@@@Z)
error LNK2019: unresolved external symbol _WINRT_WindowsGetStringRawBuffer@8 referenced in function "public: __thiscall winrt::hstring::operator class std::basic_string_view<wchar_t,struct std::char_traits<wchar_t> >(void)const " (??Bhstring@winrt@@QBE?AV?$basic_string_view@_WU?$char_traits@_W@std@@@std@@XZ)
error LNK2019: unresolved external symbol "class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > __cdecl FileHelper::GetModulePath(void)" (?GetModulePath@FileHelper@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ) referenced in function "protected: void __thiscall CMyAppDoc::PrintResults(struct winrt::Windows::Foundation::Collections::IVectorView<float>)" (?PrintResults@CMyAppDoc@@IAEXU?$IVectorView@M@Collections@Foundation@Windows@winrt@@@Z)
error LNK2019: unresolved external symbol "class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > __cdecl FileHelper::LoadLabels(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?LoadLabels@FileHelper@@YA?AV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@@Z) referenced in function "protected: void __thiscall CMyAppDoc::PrintResults(struct winrt::Windows::Foundation::Collections::IVectorView<float>)" (?PrintResults@CMyAppDoc@@IAEXU?$IVectorView@M@Collections@Foundation@Windows@winrt@@@Z)




I set up the language type as: ISO C++17 Standard (/std:c++17)

What should I setup in order to run WML code inside my project ?

Continue reading...
 
Back
Top