Symbulation allows you to compile your C++ to either:
running at the command line (e.g., native machine code) and
This how-to aims to walk you through all the nitty gritty required to successfully compile a simple “default” executable for running at the command line.
If you aren’t able to install everything locally, you can try out editing the command-line version of the code on this Repl. The web version can’t be rebuilt on Replit at the moment due to missing packages on the Replit platform.
Install: Native C++ Compiler¶
In the Unix-verse (e.g., Linux / MacOS) commonly used compilers include
clang. From this point onwards, we assume that you’re working with
Unless you really know what you’re doing, you’ll want to have
gcc installed. The good news is: you might already!
Bring up a terminal and try entering:
which spits out a path, then you have
gcc installed! If
says “not found,” you’ll need to go ahead and install
Linux users, your package manager (e.g.,
apt, etc.) is probably
the way to go about this. For MacOS users, you’ll need to get Apple’s
“Command Line Tools for Xcode.” Either way, give it a quick web search
(e.g., “install gcc on [my operating system]”) and there should be
plenty of how-to guides that walk you through step-by-step.
For Windows users, things are a bit more complicated.
We recommend using Windows Subsystem for Linux and then following the steps above for
Compile & Run: Command Line¶
Assuming you haven’t already pulled down a clone of Symbulation, let’s get your working environment all set.
Regardless of how you got everything downloaded, it’s now time to compile!
cd SymbulationEmp make
You can make changes to the file
SymSettings.cfg to change the configuration options without needing to recompile.
These can also be altered at the command line:
./<executable file> -<Option to change> <new value>
./symbulation_default -VERTICAL_TRANSMISSION 0.5 -GRID_X 50 -GRID_Y 50
To see how to use our workflow and scripts to collect and analyze data, please proceed to the Collecting Data quickstart guide!
Install: Web GUI¶
These instructions are for if you want to make changes to the web GUI and run it locally. You don’t need to do this to be able to use Symbulation’s web browser; you can instead access it here: https://anyaevostinar.github.io/SymbulationEmp/web/symbulation.html.
First, you’ll need to set up Emscripten, which is included in the
cd emsdk ./emsdk install 1.38.48 ./emsdk activate 1.38.48
Then every time that you want to build and run Symbulation’s web GUI, you’ll need to load Emscripten into your
PATH for a given terminal session. If you’ve closed and opened a new terminal, you’ll need to do this again (this is what people usually forget to do after they’ve been away for a while):
cd emsdk source ./emsdk_env.sh
Then navigate back to SymbulationEmp’s top folder and build the web version:
cd .. make web
Now you have the website all built and in the
web folder, so just run:
You should then be able to go to http://localhost:8000/ to see you custom run Symbulation GUI!