Help installing pgplot
I have searched various websites and tried many times to install pgplot, but still cannot get it to install/work correctly.
My most current try to get this program to install requires using g77, but even though I found g77 - 3.4.6 I cannot get that to install correctly because there are "dependency problems". I would assume this problem is with the most recent version of gcc I have installed.
So, I would appreciate it greatly if someone could walk me through how to install pgplot or install g77.
Open up the software manager, enter your password and search for pgplot. I'm guessing that it is pgplot5 that you need to install.
I have tried that and still no luck. Is there some way to test whether or not pgplot is installed?
specifically I am running a fortran file which cannot find the pgplot functions.
What I am doing is typing:
( I then get the reply)
/tmp/ccP3twV7.o: In function `plotfit_':
orbits.f:(.text+0x14f4): undefined reference to `pgbegin_'
orbits.f:(.text+0x151e): undefined reference to `pgenv_'
orbits.f:(.text+0x1532): undefined reference to `pgqlw_'
collect2: error: ld returned 1 exit status
"...as with most UNIX systems, you link a program with PGPLOT with a command like the following:
f77 -o example example.f -L/usr/local/pgplot -lpgplot
Excerpt from PGPLOT Frequently Asked Questions
Assuming that PGPLOT is installed, the important information here is that the library and possibly the location need to be specified. I think that's all you'll to add to your gfortran command. Perform a few experiments.
Best wishes ... cheers, drl
i installed pgplot but when compiling (with this instruction:# gfortran test.f90 -o test.exe -lpgplot) i have this problem.
/tmp/ccpvxyDM.o: In function `MAIN__':
test.f90:(.text+0x565): undefined reference to `pgbegin_'
collect2: ld returned 1 exit status
can you please help me ???
1) the pgplot link above lists 4 linking solutions that could be adapted and tried. Note that they are/were for Solaris, hence the word adapt.
2) My recollection is that pgplot is Fortran-77. Your code appears to be Fortran-90. I have no idea whether that would make a difference, but if none of the 4 solutions for linking work, then I would make sure everything is Fortran-77.
3) The documentation for pgplot (pre-year 2000) suggests that it is old in general. While it still may be usable, perhaps a better use of one's time is to look for a replacement plotting package.
4) There is an entry in the Debian repository:
for a system like:
pgplot5 - large subroutine library for plotting scientific data
which may be useful for comparison, and alleviation of installation / linking / execution problems.
OS, ker|rel, machine: Linux, 3.2.0-4-amd64, x86_64
Distribution : Debian GNU/Linux 7
Good luck ... cheers, drl