问候语
我正在为qt-everywhere-opensource-src-5.5.1
建立Visual Studio 2010
,但在webkit
nmake
时,我会收到以下错误。
( if not exist Makefile.ANGLE.DerivedSources C:\QT-Source\qt-everywhere-opensource-src-5.5.1\qtbase\bin\qmake C:\QT-Source\qt-everywhere-opensource-src-5.5.1\qtwebkit\Source\ThirdParty\ANGLE\DerivedSources.pri -o Makefile.ANGLE.DerivedSources ) && "c:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\nmake.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=generated\glslang_lex.cpp src\compiler\glslang.l
C:\Program Files\GnuWin32\bin\flex.EXE: unknown flag '-'. For usage, try
C:\Program Files\GnuWin32\bin\flex.EXE --help
NMAKE : fatal error U1077: '"C:\Program Files\GnuWin32\bin\flex.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 Files\Microsoft Visual Studio 10.0\VC\INCLUDE
c:\Program Files\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
c:\Program Files\Microsoft SDKs\Windows\v7.0A\include
C:\Program Files\Microsoft Visual Studio 10.0\VC\include
C:\Hashemi\Programming\CmpiledForVS2010\icu\include
LIB=
c:\Program Files\Microsoft Visual Studio 10.0\VC\LIB
c:\Program Files\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB
c:\Program Files\Microsoft SDKs\Windows\v7.0A\lib
C:\Program Files\Microsoft Visual Studio 10.0\VC\lib
C:\Hashemi\Programming\CmpiledForVS2010\icu\lib
PATH=
c:\Program Files\Microsoft F#\v4.0\
c:\Program Files\Microsoft Visual Studio 10.0\VSTSDB\Deploy
c:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\
c:\Program Files\Microsoft Visual Studio 10.0\VC\BIN
c:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools
c:\Windows\Microsoft.NET\Framework\v4.0.30319
c:\Windows\Microsoft.NET\Framework\v3.5
c:\Program Files\Microsoft Visual Studio 10.0\VC\VCPackages
C:\Program Files\HTML Help Workshop
c:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Performance Tools
c:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools
c:\Program Files\Microsoft SDKs\Windows\v7.0A\bin
C:\Ruby192\bin
C:\Perl\site\bin
C:\Program Files\GnuWin32\bin
C:\Perl\bin
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0\
c:\Program Files\Microsoft SQL Server\100\Tools\Binn\
c:\Program Files\Microsoft SQL Server\100\DTS\Binn\
C:\Python27
C:\Program Files\CMake 2.8\bin
C:\QT-Source\qt-everywhere-opensource-src-5.5.1\qtbase
C:\Hashemi\Programming\CmpiledForVS2010\icu\bin
什么是错的?
提前致谢
答案 0 :(得分:3)
我下载了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=generated\glslang_tab.h --output=generated\glslang_tab.cpp src\compiler\glslang.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.
要解决此问题,我将Win flex-bison添加到Path
环境变量中。
我成功完成了nmake
。
答案 1 :(得分:0)
在我的情况下,我安装了GnuWin32文件(C:\ Program Files(x86)\ GnuWin32 \ bin):“flex.exe”和“bison.exe”(以及其他文件)和“winflex”文件(C:\ winflex):“win_flex.exe”和“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错误。