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).
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
...
...
@@ -16,8 +12,8 @@ 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.
4) Check presence of g++ by typing in the powershell
`g++ -v`
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'
...
...
@@ -42,18 +38,36 @@ Switch back to c++ perspective, you should have an OpenSimRoot project.
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.
12) Running OSR in powershell.
In powershell create a folder with mkdir, and enter it with cd and run osr. Note that the filepath hast unix style slashes for the input files.
Running OpenSimRoot build on Nov 22 2018, licensed GPLv3
Trying to load model from file: OK
Running modules:
Running modules: 0.0/28.0 days. Mem 20.0 mB. #obj.=606 x64b/obj.=4406.6
1.0/28.0 days. Mem 23.0 mB. #obj.=726 x64b/obj.=4331.2
2.0/28.0 days. Mem 27.0 mB. #obj.=846 x64b/obj.=4261.3
3.0/28.0 days. Mem 33.0 mB. #obj.=996 x64b/obj.=4441.0
4.0/28.0 days. Mem 44.0 mB. #obj.=1056 x64b/obj.=5582.7
PS C:\Users\j.postma\osrtest>
```
##NOTES
12) Fix the too many sections compiler error in Debug and Release build conigurations.
1) 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!
2) 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.
3) 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.
4) Build is also possible in the power shell by issuing the make command inside the StaticBuild_win64 folder.