Linker can't find WRL dependencies

#1 · closed · 1 comments

View on GitHub ↗

bitcrazed

Code compiles, but linker complains with ... ``` 1>WhichMode.obj : error LNK2019: unresolved external symbol WindowsCreateStringReference referenced in function "private: void __cdecl Microsoft::WRL::Wrappers::HStringReference::CreateReference(wchar_t const *,unsigned int,unsigned int)" (?CreateReference@HStringReference@Wrappers@WRL@Microsoft@@AEAAXPEB_WII@Z) 1>WhichMode.obj : error LNK2019: unresolved external symbol __imp_RoActivateInstance referenced in function "long __cdecl Windows::Foundation::ActivateInstance<struct ABI::Windows::UI::ViewManagement::IUISettings3>(struct HSTRING__ *,struct ABI::Windows::UI::ViewManagement::IUISettings3 * *)" (??$ActivateInstance@UIUISettings3@ViewManagement@UI@Windows@ABI@@@Foundation@Windows@@YAJPEAUHSTRING__@@PEAPEAUIUISettings3@ViewManagement@UI@1ABI@@@Z) 1>D:\dev\bitcrazed\WhichMode\x64\Debug\WhichMode.exe : fatal error LNK1120: 2 unresolved externals ```

Comments

bitcrazed

Thanks to Raymond Chen for the tip to link to WindowsApp.Lib. Fix incoming.