Build GNU MCSim models on Windows using the Microsoft C compiler.
Skip steps 1-3 if your system already has Microsoft Visual Studio 2019 installed (including the C/C++ build tools).
-
Install Chocolatey.
-
Install Visual Studio 2019 Build Tools.
-
Install Visual C++ build tools workload for Visual Studio 2019 Build Tools.
-
Download this repo and unzip to
Documents
(My Documents
on older Windows systems). -
Rename the directory (remove the
-master
suffix).
Follow these steps to test the build environment using the butadiene example model provided:
-
Start a command prompt and change directory to
Documents\MCSimViaMSVC
. -
Execute the build batch file:
C:\Users\...\Documents\MCSimViaMSVC>model2exe.bat
- Test the resulting executable:
C:\Users\...\Documents\MCSimViaMSVC>.\out\butadiene.exe .\target\butadiene.in .\out\butadiene.out
Either use the target directory:
-
Drop a
.model
file into thetarget
directory. -
Run
model2exe.bat
.
or specify your .model
file as an argument to model2exe.bat
:
model2exe.bat <path to .model file>
In the former case, the resulting executable will be created in the out
folder. In the latter case, the resulting executable will be created in the same directory as the .model
file.