If you don't have enough environment space then you may need to increase
it. In Windows NT you can do this from the Control Panel.
In Windows 95/98, on the other hand, you need to add a line like
the following to the config.sys
file (in the root
directory):
SHELL=C:\COMMAND.COM /E:4096 /P
Assuming that your root drive and directory is c:\
and that it contains a copy of command.com
,
everytime you boot your system a new copy of the command
shell will be loaded with an environment size of 4096 and it
will be made permanent.
PATH
environment variable is used by the
loader to locate executables entered at the command line. Hence,
if you want to be able to run the C/C++ development tools
from any directory, you need to add their location to the
PATH
.
In the CS Computer Labs the command-line tools are located in the directories:
c:\Program Files\Microsoft Visual Studio\Common\MSDev98\bin
c:\Program Files\Microsoft Visual Studio\VC98\bin
INCLUDE
environment variable points to
the directories that contain the standard "includes".
In the CS Computer Labs the standard "includes" are located in the directory:
c:\Program Files\Microsoft Visual Studio\VC98\INCLUDE
LIB
environment variable points to the
directories that contain the standard libraries.
In the CS Computer Labs the standard libraries are located in the directory:
c:\Program Files\Microsoft Visual Studio\VC98\LIB
msc_base
, is used to increase its portability
and flexibility.
@echo off set msc_base=c:\Program Files\Microsoft Visual Studio rem Set the PATH to executables rem set PATH=%msc_base%\Common\MSDev98\bin;%msc_base%\VC98\bin;%PATH% rem Set the standard INCLUDE search path rem set INCLUDE=%msc_base%\VC98\INCLUDE;%INCLUDE% rem Set the Standard Library Path: rem set LIB=%msc_base%\VC98\lib;%LIB%
If you work at multiple locations you might want to remove the line:
set msc_base=c:\program files\microsoft visual studio
and put it in a separate .BAT file (named, for example,
lab.bat
). Then, you could run the .BAT file that
sets the msc_base
environment variable appropriately
for your current location before running the .BAT file that
sets up everything else.
Alternatively, you might want to include an IF statement
that sets the value of msc_base
based on
the first argument passed into the .BAT file. For example:
@echo off rem Account for my location rem set msc_base=c:\Program Files\Microsoft Visual Studio if "%1"=="home" set msc_base=e:\program files\DevStudio rem Set the PATH to executables rem set PATH=%msc_base%\Common\MSDev98\bin;%msc_base%\VC98\bin;%PATH% rem Set the standard INCLUDE search path rem set INCLUDE=%msc_base%\VC98\INCLUDE;%INCLUDE% rem Set the Standard Library Path: rem set LIB=%msc_base%\VC98\lib;%LIB%
Here, %1
refers to the first argument typed after the
name of the .BAT file at the command line. So, if this
file were named getready.bat
, entering
getready home
would get things ready for home
and anything else would get things ready for the lab.
You also might want to take a look at the information about error and warning messages that Microsoft has made available.
Copyright 2019