Page 1 of 1
How to set up DSS to compile to C
Posted: Thu Sep 21, 2023 4:07 pm
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
Re: How to set up DSS to compile to C
Posted: Thu Sep 21, 2023 4:44 pm
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\.