Trouble building Musescore

• Jun 12, 2018 - 04:56

I'm trying to get Musescore building and running on a Windows 10 box using Visual Studio. I've Been following the instructions on…

I got up to the Compile the Project step without too much trouble. However, the instructions tell me to edit the CMakeSettings.json file which I cannot find anywhere. Is this supposed to be generated by Cmake? Also, it is not obvious to me how exactly I am supposed to build or clean this project. The build menu has a single instruction saying Run Code Analysis on Solution. The only solutions listed on the Solutions panel in the Team Explorer tab are the freetype.sln - the mscore.sln does not appear. I am also getting an error message in my output window:

1> CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
1> Please set them or make sure they are set and tested correctly in the CMake files:
1> used as include directory in directory D:/dev/
1> used as include directory in directory D:/dev/
1> used as include directory in directory D:/dev/

I'm not sure why I'm getting this error - I added the files in to the dependencies directory I created as directed by the instructions, and this directory does include the lame DLL and header files.

I'm trying the Visual Studio build after trying and failing to do it with the MinGW instructions. I'd prefer to use Visual Studio, though, since I'm more familiar with it.

Can anyone help me figure out how to compile the project?


I've spent some time reading up on git. This is what I've tried after cloning a fresh copy of Musescore; let me know if I'm doing this right:

git remote add af
git checkout -b vsPort master
git fetch af
git checkout af/271135-VisualStudio2017port

(this might be slightly off - I'm reconstructing this as best I can from my shell history.) Anyhow, I believe I now have Deprado's changes in my new vsPort branch. I closed and reopened Visual Studio and am now getting a new error:

>------ Build started: Project: CMakeLists, Configuration: Debug ------
  Microsoft (R) Build Engine version for .NET Framework
  Copyright (C) Microsoft Corporation. All rights reserved.

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\MSBUILD : error MSB1016: Specify the verbosity level.
  Switch: -v

  For switch syntax, type "MSBuild /help"

Build failed.

Also, if I need to merge Deprado's changes into my main branch, how would I do that?

In reply to by blackears

I was able to fix the above error by editing the CMakeSettings.json file to update the buildCommandArgs parameter to:

"buildCommandArgs": "",

Issue is described here:…

So I am now able to start the build process! Unfortunately, I cannot create the final binary because the build ends with 17000+ linker errors:

    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x86\link.exe /ERRORREPORT:QUEUE /OUT:"D:\dev\\MuseScore\build.debug\manual\Debug\genManual.exe" /INCREMENTAL /NOLOGO C:\Qt\5.9.6\mingw53_32\lib\libQt5Test.a C:\Qt\5.9.6\mingw53_32\lib\libQt5QuickWidgets.a C:\Qt\5.9.6\mingw53_32\lib\libQt5Xml.a C:\Qt\5.9.6\mingw53_32\lib\libQt5XmlPatterns.a C:\Qt\5.9.6\mingw53_32\lib\libQt5Svg.a C:\Qt\5.9.6\mingw53_32\lib\libQt5PrintSupport.a C:\Qt\5.9.6\mingw53_32\lib\libQt5Concurrent.a C:\Qt\5.9.6\mingw53_32\lib\libQt5OpenGL.a C:\Qt\5.9.6\mingw53_32\lib\libQt5Help.a C:\Qt\5.9.6\mingw53_32\lib\libQt5Quick.a C:\Qt\5.9.6\mingw53_32\lib\libQt5Qml.a C:\Qt\5.9.6\mingw53_32\lib\libQt5Network.a C:\Qt\5.9.6\mingw53_32\lib\libQt5Sql.a C:\Qt\5.9.6\mingw53_32\lib\libQt5Widgets.a C:\Qt\5.9.6\mingw53_32\lib\libQt5Gui.a C:\Qt\5.9.6\mingw53_32\lib\libQt5Core.a kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"D:/dev/" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:/dev/" /MACHINE:X86 /SAFESEH  /machine:X86 genManual.dir\Debug\genManual.obj
D:\dev\\MuseScore\build.debug\manual\genManual.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl qt_assert(char const *,char const *,int)" (__imp_?qt_assert@@YAXPBD0H@Z) referenced in function "void __cdecl parseClass(class QString const &,class QString const &)" (?parseClass@@YAXABVQString@@0@Z) 
D:\dev\\MuseScore\build.debug\manual\genManual.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QChar::QChar(int)" (__imp_??0QChar@@QAE@H@Z) referenced in function "class QString __cdecl linkClass(class QString const &)" (?linkClass@@YA?AVQString@@ABV1@@Z) 
D:\dev\\MuseScore\build.debug\manual\genManual.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QChar::QChar(struct QLatin1Char)" (__imp_??0QChar@@QAE@UQLatin1Char@@@Z) referenced in function "void __cdecl writeOutput(void)" (?writeOutput@@YAXXZ) 

Looking at the list of linked libraries, the dependencies directory don't seem to be in there - however, I double checked and it is definitely present in my file system. There also seems to be an entry for it in the Cmake JSON file.

In reply to by Jojo-Schmitz

I wanted to test realizing figured bass. First, I tried this:
git clone
cd MuseScore
git checkout -b jimka2001-realize-figured-bass master
git pull realize-figured-bass
I successfully compiled it, but nothing happened. Not even change in the source code.
Then I tried this:
git clone
cd MuseScore
git fetch origin pull/2015/head:realize-figured-bass
git checkout realize-figured-bass
It should work, but can't compile it.
It says dependencies not found. Also, LAME variables set to NOTFOUND.

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