Reputation: 31
i am trying to compile the Qt library with Visual Studio at the command line. I am following these instructions compiling Qt framework with Visual C++, but i have trouble to start Visual Studio's vcvarsall.bat.
Following error is showing on the command prompt: "\Microsoft can not be processed syntactically at this point
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.
C:\windows\system32>cd ..
C:\Windows>cd..
C:\>cd \Program Files (x86)\Microsoft Visual Studio 12.0\VC\
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC>vcvarsall.bat amd64
"\Microsoft" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC>
Operating system: Windows 7 Ultimate x64;
Installed VS: Visual Studio 2013 Express and Visual Studio 2013 Ultimate
I have searched the hole internet about this problem but it seems that I am the only person with such an error in vcvarsall.bat. :D
I hope somebody can help me.
Upvotes: 2
Views: 7729
Reputation: 134
I compiled QT 5.10 on Windows Server 2012 R2 with Visual Studio 2017 by opening "Developer Command Prompt for VS2017(default)". No need to run vcvarsall.bat or vsvar32.bat at all. In my case I used following parameters for configure.bat:
configure.bat -static -debug -platform win32-msvc
Before that I tried to compile it like it was described here : https://doc-snapshots.qt.io/qt5-dev/windows-building.html and ran into the same problems described above. Hope this helps someone that ran into the same issue.
Upvotes: 0
Reputation: 263
I just had the same problem. For me it was an incorrect entry in the systemvariable Path.(one path was surrounded by "")
Upvotes: 2
Reputation: 31
It works now. I set the system variables manually and then I executed vsvars32.bat in vsinstalldir\Common7\Tools
Finally i don't know why vcvars32.bat doesn't work at my computer. ^^
Upvotes: 1
Reputation: 31
Thank you xMRI, i have recognised that the issue seems to be in the vcvars32.bat file. Unfortunately i have trouble to find out where the problem is.
Here the command promnpt output:
C:\windows\system32>if "x86" == "" goto x86
C:\windows\system32>if not "" == "" goto usage
C:\windows\system32>if /I x86 == x86 goto x86
C:\windows\system32>if not exist "C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\bin\vcvars32.bat" goto missing
C:\windows\system32>call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC
\bin\vcvars32.bat"
**"\Microsoft" kann syntaktisch an dieser Stelle nicht verarbeitet werden.**
C:\windows\system32> @set "PATH=C:\Program Files (x86)\Microsoft SDKs\Windows
\v8.1A\bin\NETFX 4.5.1 Tools\;C:\Perl64\site\bin;C:\Perl64\bin;C:\Python34\;C:\P
ython34\Scripts;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;"C:\Progr
am Files (x86)\Microsoft DirectX SDK (December 2005)\Utilities\Bin\x86";C:\Progr
am Files\AuthenTec TrueSuite\;C:\Program Files (x86)\Intel\iCLS Client\;C:\Progr
am Files\Intel\iCLS Client\;C:\Program Files\Common Files\Microsoft Shared\Windo
ws Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\win
dows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPow
erShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\
Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64
;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Fil
es\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\
Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R)
Management Engine Components\IPT;C:\Program Files\Java\jre7\bin;C:\Program Files
\Java\jdk1.7.0_45\bin;C:\Program Files\Common Files\Autodesk Shared\;C:\Program
Files (x86)\Autodesk\Backburner\;C:\Program Files\Microsoft SQL Server\110\Tools
\Binn\;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin;C:\Program Files\Jav
a\Java3D\1.5.1\bin;C:\Program Files (x86)\QuickTime\QTSystem\;c:\Program Files (
x86)\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files\Microsoft SQL Server\
110\DTS\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolki
t\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files (x86)\
Git\cmd; C:\Windows\System32; C:\Program Files (x86)\Microsoft Visual Studio 12.
0\VC\qt5;C:\Ruby200\bin"
C:\windows\system32>
And here the vcvars32.bat file:
::@echo off
@SET VSINSTALLDIR=c:\Program Files\Microsoft Visual Studio 12.0\
@SET VCINSTALLDIR=c:\Program Files\Microsoft Visual Studio 12.0\VC\
@SET FrameworkDir32=c:\Windows\Microsoft.NET\Framework\
@SET FrameworkVersion32=v4.0.30319
@SET Framework40Version=v3.5
@call :GetVSCommonToolsDir
@if "%VS120COMNTOOLS%"=="" goto error_no_VS120COMNTOOLSDIR
@call "%VS120COMNTOOLS%VCVarsQueryRegistry.bat" 32bit No64bit
@if "%VSINSTALLDIR%"=="" goto error_no_VSINSTALLDIR
@if "%VCINSTALLDIR%"=="" goto error_no_VCINSTALLDIR
@if "%FrameworkDir32%"=="" goto error_no_FrameworkDIR32
@if "%FrameworkVersion32%"=="" goto error_no_FrameworkVer32
@if "%Framework40Version%"=="" goto error_no_Framework40Version
@set FrameworkDir=%FrameworkDir32%
@set FrameworkVersion=%FrameworkVersion32%
@if not "%WindowsSDK_ExecutablePath_x86%" == "" (
@set "PATH=%WindowsSDK_ExecutablePath_x86%;%PATH%"
)
@if not "%WindowsSdkDir%" == "" (
@set "PATH=%WindowsSdkDir%bin\x86;%PATH%"
@set "INCLUDE=%WindowsSdkDir%include\shared;%WindowsSdkDir%include\um;%WindowsSdkDir%include\winrt;%INCLUDE%"
@set "LIB=%WindowsSdkDir%lib\winv6.3\um\x86;%LIB%"
@set "LIBPATH=%WindowsSdkDir%References\CommonConfiguration\Neutral;%ExtensionSDKDir%\Microsoft.VCLibs\12.0\References\CommonConfiguration\neutral;%LIBPATH%"
)
@rem
@rem Root of Visual Studio IDE installed files.
@rem
@set DevEnvDir=%VSINSTALLDIR%Common7\IDE\
@rem PATH
@rem ----
@if exist "%VSINSTALLDIR%Team Tools\Performance Tools" (
@set "PATH=%VSINSTALLDIR%Team Tools\Performance Tools;%PATH%"
)
@if exist "%ProgramFiles%\HTML Help Workshop" set PATH=%ProgramFiles%\HTML Help Workshop;%PATH%
@if exist "%ProgramFiles(x86)%\HTML Help Workshop" set PATH=%ProgramFiles(x86)%\HTML Help Workshop;%PATH%
@if exist "%VCINSTALLDIR%VCPackages" set PATH=%VCINSTALLDIR%VCPackages;%PATH%
@if exist "%FrameworkDir%%Framework40Version%" set PATH=%FrameworkDir%%Framework40Version%;%PATH%
@if exist "%FrameworkDir%%FrameworkVersion%" set PATH=%FrameworkDir%%FrameworkVersion%;%PATH%
@if exist "%VSINSTALLDIR%Common7\Tools" set PATH=%VSINSTALLDIR%Common7\Tools;%PATH%
@if exist "%VCINSTALLDIR%BIN" set PATH=%VCINSTALLDIR%BIN;%PATH%
@set PATH=%DevEnvDir%;%PATH%
@rem Add path to MSBuild Binaries
@if exist "%ProgramFiles%\MSBuild\12.0\bin" set PATH=%ProgramFiles%\MSBuild\12.0\bin;%PATH%
@if exist "%ProgramFiles(x86)%\MSBuild\12.0\bin" set PATH=%ProgramFiles(x86)%\MSBuild\12.0\bin;%PATH%
@if exist "%VSINSTALLDIR%VSTSDB\Deploy" (
@set "PATH=%VSINSTALLDIR%VSTSDB\Deploy;%PATH%"
)
@if not "%FSHARPINSTALLDIR%" == "" (
@set "PATH=%FSHARPINSTALLDIR%;%PATH%"
)
@if exist "%DevEnvDir%CommonExtensions\Microsoft\TestWindow" (
@set "PATH=%DevEnvDir%CommonExtensions\Microsoft\TestWindow;%PATH%"
)
@rem INCLUDE
@rem -------
@if exist "%VCINSTALLDIR%ATLMFC\INCLUDE" set INCLUDE=%VCINSTALLDIR%ATLMFC\INCLUDE;%INCLUDE%
@if exist "%VCINSTALLDIR%INCLUDE" set INCLUDE=%VCINSTALLDIR%INCLUDE;%INCLUDE%
@rem LIB
@rem ---
@if exist "%VCINSTALLDIR%ATLMFC\LIB" set LIB=%VCINSTALLDIR%ATLMFC\LIB;%LIB%
@if exist "%VCINSTALLDIR%LIB" set LIB=%VCINSTALLDIR%LIB;%LIB%
@rem LIBPATH
@rem -------
@if exist "%VCINSTALLDIR%ATLMFC\LIB" set LIBPATH=%VCINSTALLDIR%ATLMFC\LIB;%LIBPATH%
@if exist "%VCINSTALLDIR%LIB" set LIBPATH=%VCINSTALLDIR%LIB;%LIBPATH%
@if exist "%FrameworkDir%%Framework40Version%" set LIBPATH=%FrameworkDir%%Framework40Version%;%LIBPATH%
@set LIBPATH=%FrameworkDir%%FrameworkVersion%;%LIBPATH%
@goto end
@REM -----------------------------------------------------------------------
:GetVSCommonToolsDir
@set VS120COMNTOOLS=
@call :GetVSCommonToolsDirHelper32 HKLM > nul 2>&1
@if errorlevel 1 call :GetVSCommonToolsDirHelper32 HKCU > nul 2>&1
@if errorlevel 1 call :GetVSCommonToolsDirHelper64 HKLM > nul 2>&1
@if errorlevel 1 call :GetVSCommonToolsDirHelper64 HKCU > nul 2>&1
@exit /B 0
:GetVSCommonToolsDirHelper32
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v "12.0"') DO (
@if "%%i"=="12.0" (
@SET "VS120COMNTOOLS=%%k"
)
)
@if "%VS120COMNTOOLS%"=="" exit /B 1
@SET "VS120COMNTOOLS=%VS120COMNTOOLS%Common7\Tools\"
@exit /B 0
:GetVSCommonToolsDirHelper64
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" /v "12.0"') DO (
@if "%%i"=="12.0" (
@SET "VS120COMNTOOLS=%%k"
)
)
@if "%VS120COMNTOOLS%"=="" exit /B 1
@SET "VS120COMNTOOLS=%VS120COMNTOOLS%Common7\Tools\"
@exit /B 0
@REM -----------------------------------------------------------------------
:error_no_VS120COMNTOOLSDIR
@echo ERROR: Cannot determine the location of the VS Common Tools folder.
@goto end
:error_no_VSINSTALLDIR
@echo ERROR: Cannot determine the location of the VS installation.
@goto end
:error_no_VCINSTALLDIR
@echo ERROR: Cannot determine the location of the VC installation.
@goto end
:error_no_FrameworkDIR32
@echo ERROR: Cannot determine the location of the .NET Framework 32bit installation.
@goto end
:error_no_FrameworkVer32
@echo ERROR: Cannot determine the version of the .NET Framework 32bit installation.
@goto end
:error_no_Framework40Version
@echo ERROR: Cannot determine the .NET Framework 4.0 version.
@goto end
:end
Edit:
The part with the error:
C:\windows\system32>set FrameworkVersion=v5.1.20409.0
"\Microsoft" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
C:\windows\system32> set "PATH=C:\Program Files (x86)\Microsoft SDKs\Windows\
v8.1A\bin\NETFX 4.5.1 Tools\;C:\Perl64\site\bin;C:\Perl64\bin;C:\Python34\;C:\Py
thon34\Scripts;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;"C:\Progra
m Files (x86)\Microsoft DirectX SDK (December 2005)\Utilities\Bin\x86";C:\Progra
m Files\AuthenTec TrueSuite\;C:\Program Files (x86)\Intel\iCLS Client\;C:\Progra
m Files\Intel\iCLS Client\;C:\Program Files\Common Files\Microsoft Shared\Window
s Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\wind
ows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowe
rShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\I
ntel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;
C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program File
s\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\I
ntel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) M
anagement Engine Components\IPT;C:\Program Files\Java\jre7\bin;C:\Program Files\
Java\jdk1.7.0_45\bin;C:\Program Files\Common Files\Autodesk Shared\;C:\Program F
iles (x86)\Autodesk\Backburner\;C:\Program Files\Microsoft SQL Server\110\Tools\
Binn\;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin;C:\Program Files\Java
\Java3D\1.5.1\bin;C:\Program Files (x86)\QuickTime\QTSystem\;c:\Program Files (x
86)\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files\Microsoft SQL Server\1
10\DTS\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit
\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files (x86)\G
it\cmd; C:\Windows\System32; C:\Program Files (x86)\Microsoft Visual Studio 12.0
\VC\qt5;C:\Ruby200\bin"
Upvotes: 0