Compiling in other IDEs - musescore/MuseScore GitHub Wiki
Instructions assume you have already completed the required steps in:
- Set up developer environment
- Install Qt and Qt Creator
- Get MuseScore's source code
- Install dependencies
If you're a new developer, you should compile on the command line before you attempt to set up an IDE.
Qt Creator is a cross-platform IDE that comes with Qt and is specifically designed for building Qt software. For instructions, see Compile in Qt Creator.
The internal team uses Qt Creator, so you'll find it's better supported than the other options. Nevertheless, if you prefer to use a different IDE, feel free to add instructions for it below.
Summary:
Your CMake profile for MuseScore is where you can make configuration changes. Create one for MuseScore, and deselect the "share" box so it doesn't bother you in other projects. Set the build type to Debug.
It is recommended under the Qt Creator guide to have a dummy install directory under your build. To do this in CLion, add -DCMAKE_INSTALL_PREFIX=$CMakeCurrentBuildDir$/install
to the CMake Options field.
Under the run configurations menu (left of the green run arrow), click edit configurations. Create a new CMake application and choose a name for it (e.g. TestRun). Change the target to "All targets" (the topmost option in the dropdown).
Set the executable field to $CMakeCurrentBuildDir$/install/bin/mscore
. Under "Before launch," remove the default build step and add the install step.
With the new run configuration, debugging should work as normal with CLion.
This guide shows how to build MuseScore on Windows using Visual Studio 2022:
-
Prerequisites
- Install Visual Studio 2022 with the Desktop development with C++ workload.
- Install CMake (version ≥ 3.21).
- Install Git.
-
Clone the repo
-
Optional: Disable CMake Presets in VS If you have Always use CMake Presets enabled, Visual Studio will ignore your
CMakeSettings.json
and generate aCMakePresets.json
instead—so you won’t see the expectedmsvc.build_x64
folder. To restore the default behavior:- In Visual Studio go to Tools → Options → CMake → General.
- Under CMake configuration file, select Never use CMake Presets.
- Reload your “Standard Build” configuration; you’ll again get the
msvc.build_x64
folder.
-
Configure
mkdir build cd build cmake .. -G "Visual Studio 17 2022" -A x64 ` -DCMAKE_BUILD_TYPE=RelWithDebInfo
-
Open & Build
- Double-click
MuseScore.sln
in thebuild
folder to open the solution in Visual Studio. - Select the Debug configuration from the toolbar.
- Choose Build → Build Solution (or press Ctrl+Shift+B).
- Double-click
-
Run & Debug
- Press F5 to launch MuseScore under the debugger.
- Set breakpoints in C++ or QML and step through as needed.
Older instructions are here in the old Developer's Handbook. Feel free to transfer them to this page (omit anything covered in Prerequisites).
Instructions are here in the old Developer's Handbook. Feel free to transfer them to this page (omit anything covered in Prerequisites).