-
Notifications
You must be signed in to change notification settings - Fork 43
Alternatives to CMake
vmagnin edited this page Apr 23, 2022
·
5 revisions
gtk-fortran (>=4.2) can be used as a fpm dependency. See the tutorial How to use fpm to build a gtk-fortran project. This is the easiest way to discover gtk-fortran.
You can alternatively use the src/alt_build_test.sh
bash script to compile and run the gtk-fortran files and examples, using GFortran by default. It uses the directory build/byscript/
To use another compiler, use the following syntax: $ FC='mycompiler' ./alt_build_test.sh
- This script was tested in Ubuntu, but you may have to adapt it to your distribution.
- It does not substitute the
@..@
strings ingtkf-sketcher.f90
, andgtk-fortran.f90
, unlike CMake. - It does not build the PLplot examples.
If you know which gtk-fortran files are needed, you can also simply compile and run each example as follow, from the src/ directory
:
$ gfortran glib-auto.f90 cairo-auto.f90 gdk-auto.f90 gdk-pixbuf-auto.f90 gtk.f90 ../examples/julia_pixbuf.f90 $(pkg-config --cflags --libs gtk4)
$ ./a.out
For GTK 3, it's --libs gtk+-3.0
- 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