Robert Wishlaw the BCX help file maintainer, BCX Yahoo group moderator , and expert BCX coder wrote a utility to find the path to the Visual Studio 2017 batch files. These batch files set up the enviornment from the command line before compiling with cl.
The utility also highlights the COM abilities of BCX/bc9Basic. I personally do not use them much but they are available.
These 40 lines of basic translate to 1200+ lines of "c" code which was compiled with the Visual Studio 2017 cl compiler.
Attached is the "c" source and the exe.
James
'=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
'jcfuller note: The batch files this utilty displays:
'vcvars32.bat / vcvars64.bat
'call vcvarsall.bat with x86 or x64 argument respectively
'=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
$ONEXIT "VSC2017.BAT $FILE$ -m64 con"
GLOBAL str1$
GLOBAL strTargetPathx86$, SWorkx86$, SArgux86$
GLOBAL strTargetPathx64$, SWorkx64$, SArgux64$
DIM objShell AS OBJECT
SET objShell = CreateObject("Wscript.Shell")
str1$ = objShell.SpecialFolders("AllUsersPrograms")
strTargetPathx86$ = str1$ & "\Visual Studio 2017\Visual Studio Tools\VC\x86 Native Tools Command Prompt for VS 2017.lnk"
strTargetPathx64$ = str1$ & "\Visual Studio 2017\Visual Studio Tools\VC\x64 Native Tools Command Prompt for VS 2017.lnk"
SET objShell = NOTHING
IF EXIST(strTargetPathx86$) THEN
DIM objShell AS OBJECT
SET objShell = CreateObject("Wscript.Shell")
DIM objShortcut AS OBJECT
SET objShortcut = objShell.CreateShortcut(strTargetPathx86$)
str1$ = objShortcut.WorkingDirectory
SWorkx86$ = ENC$(str1$)
str1$ = objShortcut.Arguments
SArgux86$ = REMAIN$(str1$, "/k ")
SET objShortcut = NOTHING
SET objShell = NOTHING
END IF
IF EXIST(strTargetPathx64$) THEN
DIM objShell AS OBJECT
SET objShell = CreateObject("Wscript.Shell")
DIM objShortcut AS OBJECT
SET objShortcut = objShell.CreateShortcut(strTargetPathx64$)
str1$ = objShortcut.WorkingDirectory
SWorkx64$ = ENC$(str1$)
str1$ = objShortcut.Arguments
SArgux64$ = REMAIN$(str1$, "/k ")
SET objShortcut = NOTHING
SET objShell = NOTHING
END IF
PRINT "32 bit Working Directory ", SWorkx86$
PRINT "32 bit Arguments ", SArgux86$
PRINT "64 bit Working Directory ", SWorkx64$
PRINT "64 bit Arguments ", SArgux64$
Pause