The file mdl.bat controls the compilation process. The most common problem with this file is that the simulation paths have not been properly set. For most modern versions of Visual Studio, this is easily accomplished with a call to vcvars32.bat or similar. However, you may need to make slight adjustments, for example to recognize the difference between c:\Program Files and c:\Program Files (x86).
For older versions, we recommend that you explicitly set the compilation paths with commands such as:
path = "c:\Program Files\Microsoft Visual Studio\VC98\bin;"c:\Program Files\Microsoft Visual Studio\common\MsDev98\bin"
set LIB=c:\Program Files\Microsoft Visual Studio=\lib
} set INCLUDE=c:\Program Files\Microsoft Visual Studio\vc98\include
The first two lines must actually appear on a single line. Microsoft Visual C/C++ version 5 and later require two bin directories to be included in the Path statement. Earlier versions required only 1.
The default mdl.bat that ships with Vensim has the above path, lib, and include statements, as well as commented out versions of these for earlier compilers. If you installed your compiler into a different directory or drive you will need to make adjustments to the above statements. If you make changes to mdl.bat an original version of this file is kept in mdlorig.bat.