sudo gfortran -c dislin.f90
sudo apt-get install libmotif4
sudo apt-get install libmotif4* libmotif-dev
sudo apt-get install xfonts-75dpi sudo apt-get install xfonts-100dpi
I TRIED setting Simply Fortran project options to these settings:
Fortran : -I/usr/local/dislin/gf
Link : -L/usr/local/dislin/gf -ldislin
and no luck.
Just in case I was not understanding the Simply Fortran settings, I then tried compiling and linking from the command line.
FIRST,
I tried the same commands as you mentioned (but with my pathnames/filenames):
gfortran -c /usr/local/dislin/examples/exa_f90.f90 -I/usr/local/dislin/gf
This gave an error message about being unable to find the dislin file.
SECOND
I tried compiling and linking like this:
gfortran -c /usr/local/dislin/examples/exa_f90.f90 -I/usr/local/dislin/gf
This worked, and produced a .o object file, called exa_f90.o.
I then tried linking with each of these in turn:
gfortran -o exa_f90 exa_f90.o /usr/local/dislin/dislin
gfortran -o exa_f90 exa_f90.o /usr/local/dislin/dislin.a
gfortran -o exa_f90 exa_f90.o /usr/local/dislin/libdislin.a
gfortran -o exa_f90 exa_f90.o /usr/local/dislin/libdislin
gfortran -o exa_f90 exa_f90.o /usr/local/dislin/libdislin.so
gfortran -o exa_f90 exa_f90.o /usr/local/dislin/lib/dislin_d-10.6.a
These all failed. Either they gave an error about the library file not being found, or they produced a list a mile long, of unsatisfied references.
SO frustrating!
---
John
I am extremely grateful to you for going to so much trouble to explain how to use Dislin in such detail. Your level of help and support are really fantastic.
Here's my progress report. I am posting this in case others find it interesting, and not as a further request for more help from you, Helmut.
I have now successfully compiled, linked and executed your exa_f90 example using GFortran and Dislin on the Raspberry Pi 2 with Linux Raspbian.
I have done so,
(a) from the CLI, with the executable dependent on a Dislin shared library,
(b) using an IDE, with the executable dependent on a Dislin shared library,
(c) from the CLI, with the executable as a stand-alone program, needing no library support,
but not,
(d) using an IDE, with the executable as a stand-alone program, needing no library support.
The IDE I am using is the excellent Simply Fortran, from Approximatrix.com.
A difficulty I am now having with BOTH (c) and (d) (strangely, I am having this problem AFTER having successfully completed all three of (a) to (c) above) is that the linker is throwing up an error about being unable to do '-lGL' which I know is because it can't find the OpenGL library file libGL.a.
I gave researched this and I've discovered that Raspbian does not yet fully support OpenGL. It turns out that OpenGL support IS in fact included in the latest version of Raspbian, but only experimentally. It has to be enabled using RasPi-config's 'Advanced' options. When I first successfully built (c), I had not yet either discovered about OpenGL, or enabled it. What I probably had just done is to install something connected with it, but I don't recall exactly what.
Since then, however, I've been unable to repeat (c).
I gave tried enabling OpenGL as above, but that only prevented the RPi from booting at all, so I had to edit config.txt from another laptop, to change back the two lines it altered, and I can't actually enable OpenGL at the moment. Result I can no longer do (c), even though I HAVE, somehow,
I am going to wait patiently for OpenGL to be fully implemented in Raspbian, which I hope will be soon. When that happens, I expect (c) and (d) will immediately work.
If anyone knows what I must have done to gain access to libGL.a from Raspbian just now, without enabling the experimental code, I'd love to know.
---
John