Hello,
I am trying to install pgplot on a Fedora 17 system, with gfortran. I followed all the steps given on the pgplot website - , including the appropriate edits in the files drivers.list and makefile, after which it seemed to have been 'successfully' installed.
Initially, I could not run ./pgdemo1 (one of the examples given). I solved this by doing this:
Code:
LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH
I put the above in the ~/.bashrc file too. When I do this, I am able to run all the demos in the installation directory. However, when I try to run a fortran 90 program which calls pgplot subroutines, the linker is unable to find them. I get the following error message:
Code:
gfortran -o tryplot.e tryplot.f90
/tmp/ccNwjzsG.o: In function `MAIN__':
tryplot.f90:(.text+0xd2): undefined reference to `pgbeg_'
tryplot.f90:(.text+0xfc): undefined reference to `pgenv_'
tryplot.f90:(.text+0x126): undefined reference to `pglab_'
tryplot.f90:(.text+0x148): undefined reference to `pgpt_'
tryplot.f90:(.text+0x152): undefined reference to `pgend_'
collect2: error: ld returned 1 exit status
What am I missing?
I also tried to install using
, after first installing the non-free repositories, and I end up with the same problem.
Any help/suggestions will be greatly appreciated. I'm a newbie to linux and do not understand these structures (libraries and linking etc) well..
Thank you in advance