<blockquote>
<p>`NMAKE : fatal error U1095: expanded command line [...] too long</p>
</blockquote>
<p>The problem reported is that the command line is too long. This is because of the location of your resources.</p>
<h1>Shorter path</h1>
<p>One thing you perhaps could try is to move them all to a shorter path.</p>
<h2>Drive letter</h2>
<p>Maybe even to a virtual drive letter so that each long path <code>C:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/src/opengl/.moc/release/</code> becomes a short path <code>S:</code> say.</p>
<h2>Symbolic link</h2>
<p>You might just be able to add <a href="https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/" rel="nofollow noreferrer">symbolic links</a> that allow a shorter command line to be constructed.</p>
<h1>Better shell</h1>
<p>Alternatively find a Windows command shell or &quot;make&quot; that can handle long lines -- assuming one exists.</p>

CC BY-SA 4.0
2022-01-28T10:03:18.437Z
2022-01-28T10:11:14.060Z
2022-01-28T10:11:14.060Z
RedGrittyBrick
<p>I was following this (<a href="https://github.com/bitcoin/bitcoin/blob/master/build_msvc/README.md" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/blob/master/build_msvc/README.md</a>) documentation to install Bitcoin core on Windows 10.
I have successfully configured Bitcoin core with Microsoft Visual Studio 2019 without the involvement of Qt.
Now, I want to configure Bitcoin core with Qt for the graphical interface. I followed these steps to install Qt as given in the documentation.</p>
<pre><code>cd C:\dev\qt-source

mkdir build

cd build

..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml -prefix C:\Qt_static
</code></pre>
<p>After this step, it gave the following message :</p>
<pre><code>Qt is now configured for building. Just run 'nmake'.
Once everything is built, you must run 'nmake install'.
Qt will be installed into 'C:\Qt_static'.
</code></pre>
<p>After that, when I run nmake, I get this error :</p>
<pre><code>NMAKE : fatal error U1095: expanded command line 'echo moc C:\qt-everywhere-src-5.15.2\qt-everywhere-src-5.15.2\qtbase\src\opengl\gl2paintengineex\qglengineshadermanager_p.h &amp;&amp; C:\qt-everywhere-src-5.15.2\qt-everywhere-src-5.15.2\build\qtbase\bin\moc.exe -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_OPENGL_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DNDEBUG -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --compiler-flavor=msvc --include C:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/src/opengl/.moc/release/moc_predefs.h -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/mkspecs/win32-msvc -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/src/opengl -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtOpenGL -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include/QtOpenGL -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtOpenGL/5.15.2 -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtOpenGL/5.15.2/QtOpenGL -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/src/opengl/tmp -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/src/opengl/.tracegen/release -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtWidgets/5.15.2 -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtWidgets/5.15.2/QtWidgets -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include/QtWidgets/5.15.2 -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include/QtWidgets/5.15.2/QtWidgets -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtGui/5.15.2 -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtGui/5.15.2/QtGui -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include/QtGui/5.15.2 -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include/QtGui/5.15.2/QtGui -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtCore/5.15.2 -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtCore/5.15.2/QtCore -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include/QtCore/5.15.2 -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include/QtCore/5.15.2/QtCore -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtWidgets -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include/QtWidgets -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtGui -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include/QtGui -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtCore -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include/QtCore -I. -I&quot;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\ATLMFC\include&quot; -I&quot;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include&quot; -I&quot;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um&quot; -I&quot;C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt&quot; -I&quot;C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared&quot; -I&quot;C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um&quot; -I&quot;C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt&quot; -I&quot;C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt&quot; C:\qt-everywhere-src-5.15.2\qt-everywhere-src-5.15.2\qtbase\src\opengl\gl2paintengineex\qglengineshadermanager_p.h -o .moc\release\moc_qglengineshadermanager_p.cpp' too long
Stop.

NMAKE : fatal error U1077: '&quot;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\bin\HostX64\x64\nmake.exe&quot;' : return code '0x2'
Stop.

NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
</code></pre>
<p>Can someone please help me with this?</p>
<p>Thanks in advance</p>

<bitcoin-core><bitcoind><bitcoin-core-development><bitcoin-qt-setup>
Error in configuring Qt with Bitcoin Core on Windows
An-Kh
# Error in configuring Qt with Bitcoin Core on Windows

(Asked by: username_0 on 2022-01-27)

I was following this (<https://github.com/bitcoin/bitcoin/blob/master/build_msvc/README.md>) documentation to install Bitcoin core on Windows 10.
I have successfully configured Bitcoin core with Microsoft Visual Studio 2019 without the involvement of Qt.
Now, I want to configure Bitcoin core with Qt for the graphical interface. I followed these steps to install Qt as given in the documentation.

```
cd C:\dev\qt-source

mkdir build

cd build

..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml -prefix C:\Qt_static

```

After this step, it gave the following message :

```
Qt is now configured for building. Just run 'nmake'.
Once everything is built, you must run 'nmake install'.
Qt will be installed into 'C:\Qt_static'.

```

After that, when I run nmake, I get this error :

```
NMAKE : fatal error U1095: expanded command line 'echo moc C:\qt-everywhere-src-5.15.2\qt-everywhere-src-5.15.2\qtbase\src\opengl\gl2paintengineex\qglengineshadermanager_p.h && C:\qt-everywhere-src-5.15.2\qt-everywhere-src-5.15.2\build\qtbase\bin\moc.exe -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_OPENGL_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DNDEBUG -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --compiler-flavor=msvc --include C:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/src/opengl/.moc/release/moc_predefs.h -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/mkspecs/win32-msvc -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/src/opengl -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtOpenGL -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include/QtOpenGL -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtOpenGL/5.15.2 -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtOpenGL/5.15.2/QtOpenGL -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/src/opengl/tmp -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/src/opengl/.tracegen/release -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtWidgets/5.15.2 -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtWidgets/5.15.2/QtWidgets -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include/QtWidgets/5.15.2 -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include/QtWidgets/5.15.2/QtWidgets -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtGui/5.15.2 -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtGui/5.15.2/QtGui -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include/QtGui/5.15.2 -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include/QtGui/5.15.2/QtGui -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtCore/5.15.2 -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtCore/5.15.2/QtCore -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include/QtCore/5.15.2 -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include/QtCore/5.15.2/QtCore -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtWidgets -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include/QtWidgets -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtGui -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include/QtGui -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/qtbase/include/QtCore -IC:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/include/QtCore -I. -I"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\ATLMFC\include" -I"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" C:\qt-everywhere-src-5.15.2\qt-everywhere-src-5.15.2\qtbase\src\opengl\gl2paintengineex\qglengineshadermanager_p.h -o .moc\release\moc_qglengineshadermanager_p.cpp' too long
Stop.

NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.

NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

```

Can someone please help me with this?

Thanks in advance

**Tags:** bitcoin-core, bitcoind, bitcoin-core-development, bitcoin-qt-setup


---

## 1 answers

### Answer by username_1 on 2022-01-28. Score: 1

> `NMAKE : fatal error U1095: expanded command line [...] too long

The problem reported is that the command line is too long. This is because of the location of your resources.

# Shorter path

One thing you perhaps could try is to move them all to a shorter path.

## Drive letter

Maybe even to a virtual drive letter so that each long path `C:/qt-everywhere-src-5.15.2/qt-everywhere-src-5.15.2/build/qtbase/src/opengl/.moc/release/` becomes a short path `S:` say.

## Symbolic link

You might just be able to add [symbolic links](https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/) that allow a shorter command line to be constructed.

# Better shell

Alternatively find a Windows command shell or "make" that can handle long lines -- assuming one exists.


---

