Create get started on windows 10 authored by Postma, Johannes Auke's avatar Postma, Johannes Auke
This write up is to get windows users started. This how-to is based on the assumption that you will work with eclipse, an open source integrated development environment. With eclipse you have, git, compilation, c++ and xml editing all in one program.
1) Install the gcc compilers
Windows comes without a compiler for c++, so we will install one. Windows also lacks gnu make, which is a handy program that we use to manage the compilation of the many different files. Both deficits can be fixed by installing mingw-64 (not 32).
Download mingw-w64-install.exe from
[here](https://sourceforge.net/projects/mingw-w64/files/latest/download)
and run the exe.
2) Add MinGW32 to your $PATH
In order for eclipse and powershell to find the mingw programs, they installation directory needs to be added to the windows Path. Hit the windows button and type
"edit the system environment variables". Click on environmental variables, click path, click new, and add path of installed directory (C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin)
3) Check the installation
open powershell and type the commando
`echo $env:Path `
The path should include the installed mingw directory.
4) Check presence of g++
Type g++ -v to see if it is present.
5) Rename mingw32-make to make
Go to 'C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin'
and rename mingw32-make.exe to simply make.exe.
6) Install java jdk (sun) on your system, if you have not done so.
7) Install eclipse from https://www.eclipse.org/downloads/ and in the installer choose the c++ development version.
8) Open eclipse, and open the git perspective.
Go to workbench
Open git perspective (window->perspective->open perspective->other)
9) Clone the OpenSimRoot repository
Copy the following address (ctrl+c) https://gitlab.com/rootmodels/OpenSimRoot.git and click clone in the eclipse git perspective. Fill out you gitlab credentials and click next till finished.
10) Import the eclipse project
Right click on working tree in the cloned OpenSimRoot folder and choose to import the eclipse project in OpenSimRoot/OpenSimRoot
Switch back to c++ perspective, you should have an OpenSimRoot project.
11) Switch to the windows build configuration and build.
Click on the rectangle next to the hammer (in the middle) and choose release.
ctrl+b will build the project in eclipse. This may take a couple of minutes.
##NOTES
12) Fix the too many sections compiler error in Debug and Release build conigurations.
Mingw things that the functionInterpretor.cpp file is basically too large. We can fix this by adding a compiler option:
`-Wa,-mbig-obj`
Todo this go to the eclipse project properties. In C/C++ build -> settings -> Tool settings -> GCC C++ compiler -> Miscellaneous and add the option to the other flags.
13) Eclipse has a build in editor for XML files, which has auto completion!
14) Right click on the project and under team you find common git operations.
15) Build is also possible in the power shell by issuing the make command inside the StaticBuild_win64 folder.
\ No newline at end of file