This page explains how to build the code. You must have checked that [git](Git), [a C++ compiler](MinGW) and [cmake](CMake) are correctly installed on your system.
This page explains how to build the examples. You must have checked that [git](Git), [a C++ compiler](MinGW) and [cmake](CMake) are correctly installed on your system.
## Windows
## Windows
* Clone the repository somewhere on your PC using "git bash"
* Clone the repository somewhere on your PC using "git bash"
...
@@ -18,7 +18,11 @@ cd ..
...
@@ -18,7 +18,11 @@ cd ..
```
```
envs\windows.cmd
envs\windows.cmd
```
```
* Then, in the same terminal, create a build folder:
* Then, in the same terminal, go to an example folder:
```
cd examples\gmsh_api
```
* Create a build folder in `examples\gmsh_api`:
```
```
mkdir build
mkdir build
```
```
...
@@ -30,14 +34,13 @@ cd build
...
@@ -30,14 +34,13 @@ cd build
```
```
cmake ..
cmake ..
```
```
* start the compilation (with 4 cores)
* start the compilation (with 4 parallel processes)
```
```
make -j 4
make -j 4
```
```
* run a program
* run a program:
```
```
gmsh -3 ..\srcs\mymesh.geo
code1_loadgeo.exe ..\rectangle.geo
bin\myview.exe ..\srcs\mymesh.msh
```
```
If a window does not show up, it means that you forgot to run `envs\windows.cmd`.
If a window does not show up, it means that you forgot to run `envs\windows.cmd`.