Trouble building Musescore
I'm trying to get Musescore building and running on a Windows 10 box using Visual Studio. I've Been following the instructions on
https://musescore.org/en/handbook/developers-handbook/compilation/compi…
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> LAME_INCLUDE_DIR
1> used as include directory in directory D:/dev/github.com/MuseScore
1> used as include directory in directory D:/dev/github.com/MuseScore
1> used as include directory in directory D:/dev/github.com/MuseScore
...
I'm not sure why I'm getting this error - I added the files in dependencies.zip 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?
Comments
I believe you also need the code changes from https://github.com/musescore/MuseScore/pull/3645 for this to work, see also #271135: Compile MuseScore with msvc / Visual Studio
In reply to I believe you also need the… by Jojo-Schmitz
I'm only somewhat familiar with git. How would I pull this one thing? Is this someone else's fork?
In reply to I'm only somewhat familiar… by blackears
See https://musescore.org/en/handbook/developers-handbook/finding-your-way-…
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:
(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:
Also, if I need to merge Deprado's changes into my main branch, how would I do that?
In reply to I've spent some time reading… by blackears
I was able to fix the above error by editing the CMakeSettings.json file to update the buildCommandArgs parameter to:
Issue is described here:
https://developercommunity.visualstudio.com/content/problem/204617/erro…
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:
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 I was able to fix the above… by blackears
buildCommandargs changing not working.
In reply to I was able to fix the above… by blackears
This looks like a wild mix of MSVC and MinGW
In reply to This looks like a wild mix… by Jojo-Schmitz
I don't have MinGW anymore.
In reply to I don't have MinGW anymore. by BetaBleeds
There's no need to, still that output above looks very wrong and mixed up.
In reply to There's no need to, still… by Jojo-Schmitz
When I previously successfully built MuseScore, it worked out perfectly. Not anymore.
In reply to When I previously… by BetaBleeds
What did you change in between?
In reply to What did you change in… by Jojo-Schmitz
I wanted to test realizing figured bass. First, I tried this:
git clone https://github.com/musescore/MuseScore.git
cd MuseScore
git checkout -b jimka2001-realize-figured-bass master
git pull https://github.com/jimka2001/MuseScore.git realize-figured-bass
I successfully compiled it, but nothing happened. Not even change in the source code.
Then I tried this:
git clone https://github.com/musescore/MuseScore.git
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.
In reply to I wanted to test realizing… by BetaBleeds
If you really want to build 4 years old code, you need to follow the build steps like they were 4 years ago.
Back then for Windows this means MinGW