... | ... | @@ -2,8 +2,9 @@ General build instructions are available in the top-level [README](http://gitlab |
|
|
|
|
|
This page contains more detailed instructions to compile a full-featured version of Gmsh, including the compilation of common dependencies: [OpenCASCADE](https://www.opencascade.com/content/latest-release) and [FLTK](http://www.fltk.org).
|
|
|
|
|
|
Note that the commands used for the continuous integration builds and for the official releases are available in the [.gitlab-ci.yml](http://gitlab.onelab.info/gmsh/gmsh/tree/master/.gitlab-ci.yml) file. The full spec of the Docker containers used for the Linux builds are available [here](http://gitlab.onelab.info/gmsh/gmsh/tree/master/utils/docker).
|
|
|
|
|
|
Note that the commands used for the continuous integration builds and for the official releases are available in the [.gitlab-ci.yml](http://gitlab.onelab.info/gmsh/gmsh/tree/master/.gitlab-ci.yml) file:
|
|
|
* The Linux builds are performed in Docker containers, whose full specs are available [here](http://gitlab.onelab.info/gmsh/gmsh/tree/master/utils/docker)
|
|
|
* The Windows builds are done using the MingW compilers under Cygwin: see [here](#Windows environment)
|
|
|
|
|
|
## OpenCASCADE
|
|
|
|
... | ... | @@ -83,3 +84,55 @@ cmake .. |
|
|
# * for a list of all available configuration options see http://gmsh.info/doc/texinfo/gmsh.html#Compiling-the-source-code
|
|
|
make
|
|
|
```
|
|
|
|
|
|
# Windows environment
|
|
|
|
|
|
While Gmsh can be built on Windows using Microsoft Visual Studio, the official Windows binaries are produced using Cygwin and the MinGW compilers. The resulting binaries do *not* depend on the Cygwin DLL, i.e. are pure Windows executables. Follow the instructions below to set up a build environment similar to the one we use.
|
|
|
|
|
|
## Cygwin and MingW compilers
|
|
|
|
|
|
Install Cygwin from https://www.cygwin.com. Accept all defaults and select View "Full". Install the following packages:
|
|
|
* mingw64_x86_64-gcc-g++
|
|
|
* mingw64_x86_64-gcc-fortran
|
|
|
* cmake
|
|
|
* make
|
|
|
* openssh
|
|
|
* python3
|
|
|
* autoconf
|
|
|
* automake
|
|
|
* openssh
|
|
|
* git
|
|
|
* wget
|
|
|
* unzip
|
|
|
|
|
|
Also useful for debugging
|
|
|
* gdb
|
|
|
|
|
|
Also useful for editing text files
|
|
|
* emacs-w32
|
|
|
|
|
|
## Set up PATH
|
|
|
|
|
|
Type "path" in the Windows search box and choose "Edit the system environment variables". Go to "Advanced" and select "Environment variables". If the `PATH` variable does not exist (note the ALL CAPS!), create it and set it to
|
|
|
```
|
|
|
C:\cygwin64\usr\local\bin\;C:\cygwin64\usr\local\lib;C:\cygwin64\usr\x86_64-w64-mingw32\sys-root\mingw\bin
|
|
|
```
|
|
|
If `PATH` already exists, append the value (don't forget the semicolon!).
|
|
|
|
|
|
## Set up the Cygwin terminal and Bash environment variables
|
|
|
|
|
|
Open the Cygwin terminal.
|
|
|
|
|
|
Edit the `~/.bash_profile` and add the following at the end:
|
|
|
```
|
|
|
export PATH="${PATH}:/usr/x86_64-w64-mingw32/sys-root/mingw/bin:/usr/local/bin"
|
|
|
export CXX=x86_64-w64-mingw32-g++
|
|
|
export CC=x86_64-w64-mingw32-gcc
|
|
|
export FC=x86_64-w64-mingw32-gfortran
|
|
|
```
|
|
|
Then
|
|
|
```shell
|
|
|
cd
|
|
|
source .bash_profile
|
|
|
```
|
|
|
|