-
Notifications
You must be signed in to change notification settings - Fork 44
Alternative to MSYS2
vmagnin edited this page Jan 27, 2020
·
3 revisions
You can try to use gtk-fortran under Windows without MSYS2, but do not expect much support in that case. You can read this interesting page about using "GTK-Fortran with Code::Blocks IDE" under Windows 7 64bits, and also Creating a GUI using GTK3 and gtk-fortran. See also the Fortran Tools document in the Useful links section.
You will need:
- Fortran compiler (recommended is gfortran 4.6 or higher: included in MinGW http://sourceforge.net/projects/mingw)
- CMake http://www.cmake.org/cmake/resources/software.html
- GTK
- official version: GTK 2.24 http://www.gtk.org/download/win32.php (for testwin32gtk2 branch)
- GTK 3.6.1 http://www.tarnyko.net/dl/ (for testwin32gtk3 branch)
- sed http://sourceforge.net/projects/gnuwin32
- PLplot http://sourceforge.net/projects/plplot (optionally)
Install the dependencies manually.
Windows binaries of PLplot are not distributed. Therefore you have to build your own binaries (after installation of MinGW and Cmake):
- download from http://sourceforge.net/projects/plplot (latest version is 5.9.9)
- extract the archive
- cd to the extracted archive folder
mkdir build
cd build
-
cmake -DCMAKE_INSTALL_PREFIX=<installation directory> -DCMAKE_C_COMPILER=gcc -G "MinGW Makefiles" ..
(be careful to use NO space in<installation directory>
, e.g. C:\Program Files\PLplot will not work!!!) mingw32-make
mingw32-make install
- add
<installation directory>\bin
,<installation directory>\lib
and<installation directory>\lib\plplot5.9.9\driversd
to PATH - add
<installation directory>\lib\pkgconfig
to PKG_CONFIG_PATH
- GTK libraries not found after installation: Do you have spaces in the installation directory name? (e.g. C:\Program Files\GTK will not work!!!) - Reinstall GTK in a directory without spaces.
- Some GTK symbols are not found by the linker: Do you have older libgtk versions in PATH before the current version (installed by some other software, e.g. Graphviz)? - Prepend the directory with the current GTK libraries to PATH.
gtk-fortran was successfully tested on the following Windows platforms:
- Windows 7 (32 bits) with gfortran 4.6.0 20110115 (experimental) and the dll of GTK 2.22.1, put in the src directory.
- Windows XP SP3 (32 bits) with gfortran 4.7.2-1 and GTK 2.24
- Windows XP SP3 (32 bits) with gfortran 4.7.2-1 and GTK 3.6.1
- Installation
- My first gtk-fortran application
- Drawing an image in a PNG file (without GUI)
- A program also usable without GUI
- Using Glade3 and gtkf-sketcher (GTK 3)
- Using gtk-fortran as a fpm dependency
- Debugging with GtkInspector
- Learning from examples
- Video tutorials
- How to start my own project from a gtk-fortran example
- git basics
- CMake basics
- Alternatives to CMake
- How to migrate to GTK 4
- How to contribute to gtk-fortran
- How to hack the cfwrapper