【发布时间】:2019-08-20 00:07:30
【问题描述】:
我正在尝试使用 x64 Native Tools VS 2017 命令提示符内的这些命令创建 Qt 5.13.0 的静态版本。但是,我得到了 nmake 的错误,我不知道如何修复。第一个命令也给了我一个问题。
configure -static -release -nomake examples -platform win32-msvc
nmake
第一个命令给了我这个:
Note: Using static linking will disable the use of dynamically
loaded plugins. Make sure to import all needed static plugins,
or compile needed modules into the library.
Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.
Either ensure that llvm-config is in your PATH environment variable, or set LLVM_INSTALL_DIR to the location of your llvm installation.
On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution.
On macOS, you can use Homebrew's llvm package.
On Windows, you must set LLVM_INSTALL_DIR to the installation path.
WARNING: Python version 2 (2.7.5 or later) is required to build QtWebEngine.
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\Qt-5.13.0'.
Prior to reconfiguration, make sure you remove any leftovers from
the previous build.
我忽略了这一点并使用nmake 命令。但是,我在整个过程中遇到了一组错误。请原谅行数,但我不确定是哪个错误导致了致命错误或为什么会抛出它:
qwin10helpers.cpp
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.ApplicationModel.Contacts.h(7090): error C2146: syntax error: missing '}' before identifier 'DEPRECATEDENUMERATOR'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.ApplicationModel.Contacts.h(7090): error C2143: syntax error: missing ';' before '<L_TYPE_raw>'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.ApplicationModel.Contacts.h(7148): error C2143: syntax error: missing ';' before '}'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.ApplicationModel.Contacts.h(7152): error C2059: syntax error: '}'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.ApplicationModel.Contacts.h(7152): error C2143: syntax error: missing ';' before '}'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.ApplicationModel.Contacts.h(7166): error C2143: syntax error: missing ';' before '{'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.ApplicationModel.Contacts.h(7166): error C2447: '{': missing function header (old-style formal list?)
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Security.EnterpriseData.h(2075): error C2146: syntax error: missing '}' before identifier 'DEPRECATEDENUMERATOR'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Security.EnterpriseData.h(2075): error C2143: syntax error: missing ';' before '<L_TYPE_raw>'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Security.EnterpriseData.h(2127): error C2143: syntax error: missing ';' before '}'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Security.EnterpriseData.h(2131): error C2059: syntax error: '}'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Security.EnterpriseData.h(2131): error C2143: syntax error: missing ';' before '}'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Security.EnterpriseData.h(2145): error C2143: syntax error: missing ';' before '{'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Security.EnterpriseData.h(2145): error C2447: '{': missing function header (old-style formal list?)
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Networking.Sockets.h(3127): error C2146: syntax error: missing '}' before identifier 'DEPRECATEDENUMERATOR'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Networking.Sockets.h(3127): error C2143: syntax error: missing ';' before '<L_TYPE_raw>'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Networking.Sockets.h(3170): error C2143: syntax error: missing ';' before '}'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Networking.Sockets.h(3174): error C2059: syntax error: '}'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Networking.Sockets.h(3174): error C2143: syntax error: missing ';' before '}'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Networking.Sockets.h(3188): error C2143: syntax error: missing ';' before '{'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Networking.Sockets.h(3188): error C2447: '{': missing function header (old-style formal list?)
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.UI.Notifications.h(3833): error C2146: syntax error: missing '}' before identifier 'DEPRECATEDENUMERATOR'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.UI.Notifications.h(3833): error C2143: syntax error: missing ';' before '<L_TYPE_raw>'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.UI.Notifications.h(4461): error C2143: syntax error: missing ';' before '}'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.UI.Notifications.h(4465): error C2059: syntax error: '}'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.UI.Notifications.h(4465): error C2143: syntax error: missing ';' before '}'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.UI.Notifications.h(4479): error C2143: syntax error: missing ';' before '{'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.UI.Notifications.h(4479): error C2447: '{': missing function header (old-style formal list?)
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Media.Render.h(163): error C2146: syntax error: missing '}' before identifier 'DEPRECATEDENUMERATOR'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Media.Render.h(163): error C2143: syntax error: missing ';' before '<L_TYPE_raw>'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Media.Render.h(196): error C2143: syntax error: missing ';' before '}'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Media.Render.h(200): error C2059: syntax error: '}'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Media.Render.h(200): error C2143: syntax error: missing ';' before '}'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Media.Effects.h(269): error C2143: syntax error: missing ';' before '{'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Media.Effects.h(269): error C2447: '{': missing function header (old-style formal list?)
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Media.Effects.h(902): error C2039: 'IAudioCaptureEffectsManager': is not a member of 'ABI::Windows::Media::Effects'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Media.Effects.h(886): note: see declaration of 'ABI::Windows::Media::Effects'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Media.Effects.h(902): error C2065: 'IAudioCaptureEffectsManager': undeclared identifier
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Media.Effects.h(902): error C2059: syntax error: '>'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.Media.Effects.h(903): error C3770: 'unknown-type': is not a valid base class
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.ApplicationModel.Background.h(4289): error C2146: syntax error: missing '}' before identifier 'DEPRECATEDENUMERATOR'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.ApplicationModel.Background.h(4289): error C2143: syntax error: missing ';' before '<L_TYPE_raw>'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.ApplicationModel.Background.h(4322): error C2143: syntax error: missing ';' before '}'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.ApplicationModel.Background.h(4326): error C2059: syntax error: '}'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.ApplicationModel.Background.h(4326): error C2143: syntax error: missing ';' before '}'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.ApplicationModel.Background.h(4340): error C2143: syntax error: missing ';' before '{'
c:\program files (x86)\windows kits\10\include\10.0.16299.0\winrt\Windows.ApplicationModel.Background.h(4340): error C2447: '{': missing function header (old-style formal list?)
qwindowsglcontext.cpp
qwindowsclipboard.cpp
qwindowsdrag.cpp
qwindowstabletsupport.cpp
Generating Code...
Compiling...
main.cpp
qwindowsbackingstore.cpp
qwindowsgdiintegration.cpp
Generating Code...
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\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.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
【问题讨论】:
-
您可能会在以下某些地方获得更快的响应:wiki.qt.io/Online_Communities(我会先去 irc,但那只是我)。
-
您是否安装了 Windows 10 SDK 和 Python?安装过程需要 Python。也不要忘记将你的 python 路径添加到 path 环境变量中。
-
Python 和 Windows SDK 都有。
-
我也遇到了同样的问题,你找到解决办法了吗?
标签: windows qt build static windows-runtime