Please enable JavaScript to view this site.

Vensim Help

The most common compile error message is a "Bad Command or Filename" in response to the CL command (or gcc not installed on the Macintosh).  Usually this means that you have not set up paths to the C compiler correctly.  See the discussion of mdl.bat below for more details.

Sometimes, however, you will get other error messages and the easiest way to track these down is with this set of steps:

1.Save your model in binary form in the same directory you have installed the compiled simulation files (normally this is c:\Documents and Settings\All Users\Vensim\comp (Windows XP), c:\Users\Public\Vensim\comp (Windows Vista/7) or /Users/Shared/Vensim/comp (Macintosh)).  You do not need to copy any supporting datasets or other files.
2.Attempt to compile and simulate this model.

If step 2 succeeds there is something very funny going on, and the following steps may not be of much help.  If it fails, as is to be expected, continue working through these steps.

3.Using the visual interface to C/C++ open the makefile sim.mak contained in the compiled simulation directories as a project.   Depending on which version of C you have you may be asked to convert this file to another form, do so saving it as another name.
4.Attempt to build the sim.dll project.  You should then be able to more clearly understand what errors have occurred.

If there are errors in mdl.c that prevent compilation it is not worthwhile to correct them. mdl.c is generated automatically by Vensim and either the code it is putting out is bad, or something has happened to simext.c (which it includes) or vensim.h  to render the statements wrong.  If you did not change either of these files please contact us .