Topic: Struggling with DISLIN + GFortran under Raspbian
This is an old discussion, from when I was trying to work out
(a) how to install DISLIN on the RPi,
(b) how to make GFortran work how to make DISLIN link DISLIN code,
(c) how to do that also with Simply Fortran.
It was tricky but I got there.
I am therefore starting, today 30-06-2016, a NEW TOPIC with this name:
DISLIN with GFortran on Raspberry Pi with Raspbian
I will explain fully under that new topic how to do it.
Please look there instead of here.
----
John
THE ORIGINAL START OF THIS NOW-SUPERSEDED TOPIC NOW FOLLOWS:
I have posted the question shown below on the Google Groups forum for DISLIN users, at
https://groups.google.com/forum/#!topic … VeYv9nYvh8 .
If anyone there gives me the solution, I'll post it here.
If anyone here can show me the solution, I'll post it there.
THE QUESTION
From: John Wasilewski <john@wasilewski.co.uk>
To: dislin-users <dislin-users@googlegroups.com>
Subject: DISLIN with GFortran on Raspberry Pi with Raspbian
Date: Sat, 23 Apr 2016 01:27:11 -0700 (PDT)
Reply-To: dislin-users@googlegroups.com
Sender: dislin-users@googlegroups.com
I can't work out how to build GFortran projects under Raspbian, when calling DISLIN routines.
If anyone could help, I'd be very grateful.
I have been trying to discover how to do it by attempting to build an executable from the DISLIN F90 example, exa_f90.f90
I have GFortran successfully installed, and working properly.
I have installed DISLIN using the INSTALL script.
I put it in /usr/local/dislin
I am using Simply Fortran as my IDE. This works properly.
I have compiled dislin.mod from dislin.f90, to make sure that dislin.mod has been compiled with the same version of GFortran as I am using for my own source files. I did this in folder /usr/local/dislin with the command,
sudo gfortran -c dislin.f90
I am using the linker to load dislin.mod together with my object files.
I am expecting to need also to link libdislin.a .
When I try to build an executable using
- my object files
- the version of dislin.mod that I have compiled with the same compiler version
- libdislin.a ,
I get shedloads of undefined references.
I've tried with
- my object files
- the version of dislin.mod as above
- dislin-10.6.a
..and with
- my object files
- the version of dislin.mod as above
- libdislin.so .
None of these works.
I've run the following commands:
sudo apt-get install libmotif4
sudo apt-get install libmotif4* libmotif-dev
sudo apt-get install xfonts-75dpi
sudo apt-get install xfonts-100dpi
..and I then tried again to build an executable by all the same methods as before.
The IDE I am using is Simply Fortran.
When making each build attempt, I have tried in two ways. One is by adding both DISLIN files directly to the project. The other is by specifying these Project options :
Fortran compiler > -I/usr/local/dislin/gf
Linker > /usr/local/dislin/libdislin.a
By all of these attempts, I just can't get my GFortran projects that USE DISLIN, to work.
CAN ANYONE HELP?
---
John