On 2020-08-23 11:44+0200 ronald deslandes wrote:

Hello
since  some decades I am trying to access functionality for the use of plplot
I am running on Linux Leap15.0
I am a 75-Dino(saur) still working on Fortran.
Since two weeks I succeed in installing plplot with Cmake and looking at some 
old mails you exchanged
with some bros, I even succeeded in compiling the examples with DBUILD_TEST=ON.
But excuse that I still feel like in a no-where-land and I do not know what to 
do.
So I just derived a simple own program I tried to compile but I failed.
Can you help?
 
program my1stpl
use plplot
implicit none
real(plflt),dimension(6) :: x,y
real(plflt) :: xmin,ymin,xmax,ymax
x(1)=1
x(2)=2
x(3)=3
x(4)=4
x(5)=5
x(6)=6
y=x*x
write(*,*) y
call plinit()
xmin=1.
ymin=1.
xmax=7.
ymax=40.
call plcol0(1)
call plenv(xmin,xmax,ymin,ymax,0,0)
call pllab('X','Y','MY1ST 2D PLOT')
call plpoin(x,y,8)
call plline(x,y)
call plend()
end program my1stpl
 
linux-cj8n:~ # gfortran my1stpl.f90 -o my1stpl /root/plplot/build_dir/lib/csa 
/root/plplot/build_dir/bindings/fortran
/root/plplot/build_dir/src
my1stpl.f90:2:4:
 use plplot
    1
Fatal Error: Can't open module file ‘plplot.mod’ for reading at (1): No such 
file or directory
compilation terminated.
linux-cj8n:~ #
 
(I found a plplot.mod but it the file appears as music note)

Hi Ron:

The best place to ask for PLplot help is the plplot-general mailing list which 
I am CCing my response to.
So for further questions I suggest you subscribe to that list (see 
<https://sourceforge.net/projects/plplot/lists/plplot-general> for directions).

Since compiling all the examples with -DBUILD_TEST=ON works for you,
you are 99% there, and you should just need a tiny bit more to build and
run your own programme against plplot.

After your above -DBUILD_TEST=ON test, the needed plplot.mod file should appear 
in the bindings/fortran
subdirectory of the build tree.  Here is what the file command says about that 
file
on my own system:

irwin@merlin> file ~software/plplot/HEAD/build_dir/bindings/fortran/plplot.mod
/home/software/plplot/HEAD/build_dir/bindings/fortran/plplot.mod: gzip 
compressed data, from Unix, original size 430087

You will likely get something similar on your own Linux system.

To tell gfortran where that *.mod file is, use the gfortran -I option.
Furthermore, gfortran will need to know the location of the Fortran
bindings library.  Therefore, I suggest you change the above command
to

gfortran my1stpl.f90 -o my1stpl -I/root/plplot/build_dir/bindings/fortran 
/root/plplot/build_dir/bindings/fortran/libplplotfortran.so

(You might need to add other -I options for other *.mod files, but I
doubt you will need to mention other libraries.)

Finally, the run-time loader will also need to know where the library
is at run time so assuming the above build works, you would run the
resulting command as

env LD_LIBRARY_PATH=/root/plplot/build_dir/bindings/fortran ./my1stp

Good luck, and please let the mailing list know how it goes with the above 
suggestions.

Alan
__________________________
Alan W. Irwin

Research affiliation with the Department of Physics and Astronomy,
University of Victoria, Victoria, BC, Canada.

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.org); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to