Building Musescore with Visual Studio 2022

• Dec 18, 2022 - 02:41

Hi,
I have been having some trouble getting Musescore to compile on my computer with Visual Studio 2022. I was able to generate a solution file, but I get linker errors when building it.

Many are similar to this:
Error LNK2019 unresolved external symbol WINRT_GetRestrictedErrorInfo referenced in function "public: __cdecl winrt::hresult_error::hresult_error(struct winrt::hresult,struct winrt::take_ownership_from_abi_t)"

I also get the error: "Variable CMAKE_BUILD_TYPE is defined multiple times."

Additionally, set the generator in CMakeSettings.json to "Visual Studio 17 2022" in order to generate the solution.

I am wondering if there are fixes to these errors and if I should even be using Visual Studio 2022 since the instructions are for VS2019. I would prefer it but if I had to use a different version of VS that would be fine.

[Update]: I eventually just installed VS 2019 and followed the directions again, but I am still getting the same linker errors(except for the cmake one). Any help for those would still be appreciated.

Thanks for the help,
Alex


Comments

Do you still have an unanswered question? Please log in first to post your question.