How to set up DSS to compile to C

Use this forum to post Vensim related questions.
Post Reply
ulrgol
Junior Member
Posts: 6
Joined: Mon May 24, 2021 2:12 pm
Vensim version: PRO

How to set up DSS to compile to C

Post by ulrgol »

Hi, using PRO 9.4.2 and experimenting with DSS (the trial from the recent SD conference) Can't get the compilation to C to work, is there a tutorial / guide how to set up the files / folders / dependencies that I could look at?
Thanks, Ulrich
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: How to set up DSS to compile to C

Post by tomfid »

The section you want is in the docs, https://www.vensim.com/documentation/25945.html, but I see it's out of date.

Generally what you need (assuming Windows) is:

Edit C:\Users\Public\Vensim\vengine\comp\MDLDP64.BAT (this is the compilation script)

Early on, you'll see a series of blocks that set up the Visual Studio environment, like

Code: Select all

REM The following should work with Microsoft C/C++ Version 2022
REM
REM Note : You must ensure that you have the correct compile tools installed.
REM During installation, select "Desktop development with C++" and tick all boxes.
REM
if exist "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" (
echo Visual Studio 2022
call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" -arch=amd64
goto comp
)	
Verify that the VS batch file actually exists at the specified location. If not, edit the path to point to the right place.

A common issue is needing to substitute \Professional\ or \Enterprise\ for \Community\.
Post Reply