Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

V29 can't run vcvars64.bat

May
13,202
180
I get an endless stream of these.

Code:
v:\> "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
TCC: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat [97]  Unknown command "all"
[ERROR:vcvarsall.bat] Invalid argument found :

vcvars64.bat calls vcvarsall.bat and there, line 97 is the FOR statement below;

Code:
:parse_loop
for /F "tokens=1,* delims= " %%a in ("%__VCVARSALL_ARGS_LIST%") do (
    if "%VSCMD_DEBUG%" GEQ "2" (
        @echo [DEBUG:%~nx0] inner argument {%%a}
    )
    call :parse_argument %%a
    set "__VCVARSALL_ARGS_LIST=%%b"
    goto :parse_loop
)

V28 runs the bat file without error, but when it's over, the environment has not been altered.

CMD runs it and the environment is properly updated.
 
I use Visual Studio 2022 from the TCC line frequently.

This works for me;
Code:
R:\>alias vc64
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"

R:\>vc64
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.4.4
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

Environment is modified to use Visual Studio 2022 from the TCC line;
Code:
VCIDEInstallDir=C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\VC\
VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\
VCToolsInstallDir=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\
VCToolsRedistDir=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Redist\MSVC\14.34.31931\
VCToolsVersion=14.34.31933
VisualStudioVersion=17.0
VS170COMNTOOLS=C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\
VSCMD_ARG_app_plat=Desktop
VSCMD_ARG_HOST_ARCH=x64
VSCMD_ARG_TGT_ARCH=x64
VSCMD_VER=17.4.4
VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio\2022\Community\

Joe
Code:
     _x64: 1
   _admin: 1
_elevated: 1

TCC  29.00.17 x64   Windows 10 [Version 10.0.19044.2486]
 
Heehee! I was using aliases to share strings among TCC instances and had this left over in my global alias list. It must have come from a botched command line.

Code:
v:\> alias | grep all
for=all good men ...

That certainly explains the unknown command "all". It's all better now.
 

Attachments

  • 1674440636741.png
    1674440636741.png
    6.3 KB · Views: 108
Back
Top
[FOX] Ultimate Translator
Translate