Get the code and create a VS-project
git clone https://github.com/JuPedSim/jpscore.git cd jpscore cmake .
Visual Studio: Preparation
Before you proceed make sure your Visual Studio has some features installed.
In our case we need
NuGet. So if it’s not already installed then click
Tools --> Get Tools and Features
This will start Visual Studio Installer and ask to make changes in Visual Studio. Choose the appropriate packages and proceed.
Visual Studio: Compilation
With Visual Studio open the created JPScore solution (
and do the following
Right click on the Solution --> Restore NuGet Packages
If Visual Studio offers you to restore the packages automatically, as shown in the following screenshot, click on
Restore(and be patient …)
jpscoreshould be marked bold (important for running the code later on). If this is not the case, then
right click on jpscore --> Set as startup Project
After this step the project will appear bold (jpscore).
View --> Other Windows --> Open Package Manager Console
and type the following
Update-Package -reinstall -ProjectName core
Update-Package -reinstall -ProjectName jpscore
Build --> Build Solution
If this step is successful then proceed to the next step and run the code
Debug –> Start Without Debugging
This will run jpscore in debug mode.
Debug --> jpscore Properties --> Debugging --> Command Arguments
and type the full path to a demo file. For example:
C:\Users\here full path\demos\scenario_1_corridor\corridor_ini.xml
Install using package manager vcpkg
First install vcpkg:
git clone https://github.com/Microsoft/vcpkg cd vcpkg .\bootstrap-vcpkg.bat
JuPedSim following C++ libraries are needed:
To install these libraries run the following:
./vcpkg.exe install qt5 ./vcpkg.exe install vtk ./vcpkg.exe install boost-system boost-timer boost-test boost-filesystem boost-chrono boost-geometry boost-graph ./vcpkg.exe install zlib:x86-windows-static
Now in order to compile a JuPedSim package (e.g. jpscore)
cd jpscore mkdir build cd build cmake -DCMAKE_TOOLCHAIN_FILE="path\\to\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake" ..
If this runs without errors, it means all requirements are fulfilled and you can proceed with the compilation
If you have a compiler (MinGW, or Cygwin).
Alternatively, in case you use Visual Studio you may need to
File -> Open -> Project/Solution
and select the Visual-Studio solution produced in the prior step by cmake (sln-file). After a while when VS finishes indexing the project click on
Build -> Build Solution.