Handmade Hero » Forums » Code » Error - Trying to run vcvarsall.bat x64 from the shell.bat file
Titan867
2 posts
#12676 Error - Trying to run vcvarsall.bat x64 from the shell.bat file
2 months, 3 weeks ago

This is the shell.bat file (I had to make some changes since the Call function? thing has changed over time and now needs a title I think?):

1
2
3
@echo off
call "shell.bat" "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
set path=w:\handmade\misc;%path%


This is what comes up in the command prompt:

W:\handmade\misc>shell
****** B A T C H R E C U R S I O N exceeds STACK limits ******
Recursion Count=593, Stack Usage=90 percent
****** B A T C H PROCESSING IS A B O R T E D ******

W:\handmade\misc>

I am not very experienced with programming so I would really appreciate some help.
I've spent some time trying to fix this but apart from the cmd prompt not being able to do anything with it, this error was the only thing I got to.
mmozeiko
Mārtiņš Možeiko
1485 posts
1 project
#12677 Error - Trying to run vcvarsall.bat x64 from the shell.bat file
2 months, 3 weeks ago Edited by Mārtiņš Možeiko on July 30, 2017, 10:23 a.m.

You are calling shell.bat file from shell.bat file. This is infinite recursion.

Instead just call vcvarsall.bat file:
1
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64

Titan867
2 posts
#12688 Error - Trying to run vcvarsall.bat x64 from the shell.bat file
2 months, 3 weeks ago

I was so sure that i had tried that

Thank you, it works now

W:\handmade\misc>shell
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.0.26430.15
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

W:\handmade\misc>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25019 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]

W:\handmade\misc>