问候
我正在为Visual Studio 2010
构建qt-everywhere-opensource-src-5.5.1
,但当涉及到nmake
中的webkit
时,我会得到以下错误。
( if not exist Makefile.ANGLE.DerivedSources C:QT-Sourceqt-everywhere-opensource-src-5.5.1qtbasebinqmake C:QT-Sourceqt-everywhere-opensource-src-5.5.1qtwebkitSourceThirdPartyANGLEDerivedSources.pri -o Makefile.ANGLE.DerivedSources ) && "c:Program FilesMicrosoft Visual Studio 10.0VCBINnmake.exe" -f Makefile.ANGLE.DerivedSources
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
flex --noline --nounistd --outfile=generatedglslang_lex.cpp srccompilerglslang.l
C:Program FilesGnuWin32binflex.EXE: unknown flag '-'. For usage, try
C:Program FilesGnuWin32binflex.EXE --help
NMAKE : fatal error U1077: '"C:Program FilesGnuWin32binflex.EXE"' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '(' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
这就是我配置的方式
configure -debug-and-release -opensource -platform win32-msvc2010 -icu -prefix C:QT-Compile
这是我的环境变量信息
Environment:
INCLUDE=
c:Program FilesMicrosoft Visual Studio 10.0VCINCLUDE
c:Program FilesMicrosoft Visual Studio 10.0VCATLMFCINCLUDE
c:Program FilesMicrosoft SDKsWindowsv7.0Ainclude
C:Program FilesMicrosoft Visual Studio 10.0VCinclude
C:HashemiProgrammingCmpiledForVS2010icuinclude
LIB=
c:Program FilesMicrosoft Visual Studio 10.0VCLIB
c:Program FilesMicrosoft Visual Studio 10.0VCATLMFCLIB
c:Program FilesMicrosoft SDKsWindowsv7.0Alib
C:Program FilesMicrosoft Visual Studio 10.0VClib
C:HashemiProgrammingCmpiledForVS2010iculib
PATH=
c:Program FilesMicrosoft F#v4.0
c:Program FilesMicrosoft Visual Studio 10.0VSTSDBDeploy
c:Program FilesMicrosoft Visual Studio 10.0Common7IDE
c:Program FilesMicrosoft Visual Studio 10.0VCBIN
c:Program FilesMicrosoft Visual Studio 10.0Common7Tools
c:WindowsMicrosoft.NETFrameworkv4.0.30319
c:WindowsMicrosoft.NETFrameworkv3.5
c:Program FilesMicrosoft Visual Studio 10.0VCVCPackages
C:Program FilesHTML Help Workshop
c:Program FilesMicrosoft Visual Studio 10.0Team ToolsPerformance Tools
c:Program FilesMicrosoft SDKsWindowsv7.0AbinNETFX 4.0 Tools
c:Program FilesMicrosoft SDKsWindowsv7.0Abin
C:Ruby192bin
C:Perlsitebin
C:Program FilesGnuWin32bin
C:Perlbin
C:Windowssystem32
C:Windows
C:WindowsSystem32Wbem
C:WindowsSystem32WindowsPowerShellv1.0
c:Program FilesMicrosoft SQL Server100ToolsBinn
c:Program FilesMicrosoft SQL Server100DTSBinn
C:Python27
C:Program FilesCMake 2.8bin
C:QT-Sourceqt-everywhere-opensource-src-5.5.1qtbase
C:HashemiProgrammingCmpiledForVS2010icubin
怎么了?
提前感谢
我下载了Win-flex bison,并将其替换在程序文件和QT目录中的GnuWin32\bin中。错误消失了,多亏了"mlvljr"
然后我得到了新的错误:
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
bison --no-lines --skeleton=yacc.c --defines=generatedglslang_tab.h --output=generatedglslang_tab.cpp srccompilerglslang.y
'bison' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'bison' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '(' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
为了解决这个问题,我在Path
环境变量中添加了Win-flex bison。
我成功地完成了nmake
。
在我的案例中,我安装了GnuWin32文件(C:\Program files(x86)\GnuWin32\bin):"flex.exe"one_answers"bison.exe"(以及其他文件)以及"winflex"文件(C:\winflex):"win_flex.exe"one_answers"win_bison.exe"。所有这些文件都在PATH变量中(设置PATH=%PATH%;C:\winflex;…)。为了正确的工作,我做了以下几点:
1) 将C:\Program Files(x86)\GnuWin32\bin\flex.exe重命名为一些未使用的名称。
2) 将C:\Program Files(x86)\GnuWin32\bin\bison.exe重命名为一些未使用的名称。
3) 将C:\winflex\win_bison.exe重命名为bison.exe.
并修复了flex错误。