musescore / musescore/MuseScore
Windows long-path linker issue
@Eism is already working on this.
Since Sep 9, 2026.
- Dominant language
- C++
- Stars
- 15.1k
- Forks
- 3.3k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 91
Description
Issue type
Other type of issue
Description with steps to reproduce
If I clone the MuseScore repository in a path like D:\sources\MuseScore, the build directory will be named Win-Qt6.10.1-msvc2022_64-VS18-Debug, so the full path while linking notationscene_qml_tests will exceed the 256-character path limit on Windows.
Even if I try to remove this limit from Registry (by setting HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled=1) , the linking error stil occurs.
LINK : fatal error LNK1104: cannot open file '..\..\..\..\..\framework\uicomponents\qml\Muse\UiComponents\muse_uicomponents_qml_resources_2.dir\Debug\qrc_muse_uicomponents_qml_raw_qml_0_init.obj' [D:\sources\MuseScore\builds\Win-Qt6.10.1-msvc2022_64-VS18-Debug\src\notationscene\qml\MuseScore\NotationScene\tests\notationscene_qml_tests.vcxproj]
Supporting files, videos and screenshots
My proposition would be to shorten the build directory name from build.cmake file, that is currently set to set(BUILD_FOLDER "${PLATFORM}-Qt${QT_VERSION}-${QT_COMPILER}-${GEN_SHORT}-${BUILD_TYPE}"), or find another solution.
I tried cloning to a shorter path (D:\ms), but the error can still be seen.
If I shorten the BUILD_FOLDER name in the abovementioned variable to set(BUILD_FOLDER "${PLATFORM}-${BUILD_TYPE}"), linking works fine.
In which versions of MuseScore Studio is this issue present?
4.7
Regression
Yes, this used to work in a previous version of MuseScore 4.x
I did not have this issue in the past, maybe there were some changes to the trees where the notationscene_qml_tests resides or something.
Operating system
Windows 11
Additional context
-- Including personal build overrides
QMake version 3.1
Using Qt version 6.10.1 in D:/Qt/6.10.1/msvc2022_64/lib
-- QT_LOCATION: D:/Qt
-- QT_VERSION: 6.10.1
-- QT_COMPILER: msvc2022_64
-- SOURCE_PATH: D:/sources/MuseScore
-- BUILD_PATH: D:/sources/MuseScore/builds/Win-Qt6.10.1-msvc2022_64-VS18-Debug
-- INSTALL_PATH: D:/sources/MuseScore/builds/Win-Qt6.10.1-msvc2022_64-VS18-Debug/install
-- MSCORE_EXECUTABLE: D:/sources/MuseScore/builds/Win-Qt6.10.1-msvc2022_64-VS18-Debug/install/bin/MuseScore4.exe
-- CPUS: 20
-- GENERATOR: Visual Studio 18 2026
-- BUILD_TYPE: Debug
~~~~ Actualizing Configure step ~~~~
**********************************************************************
** Visual Studio 2026 Developer Command Prompt v18.9.2
** Copyright (c) 2026 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.26200.
-- The C compiler identification is MSVC 19.51.36256.0
-- The CXX compiler identification is MSVC 19.51.36256.0
Checklist
- This report follows the guidelines for reporting bugs and issues
- I have verified that this issue has not been logged before, by searching the issue tracker for similar issues
- I have attached all requested files and information to this report
- I have attempted to identify the root problem as concisely as possible, and have used minimal reproducible examples where possible
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.