in reply to Re^2: installing pgplot on cygwin
in thread installing pgplot on cygwin

A brief look at the pages mentioned in the module lead me to think you need three things: The GrWin driver (ftp://spdg1.sci.shizuoka.ac.jp/ pub/GrWinlib/english/contrib/ pgplot/pggw0999b-cygwin.tgz), the pgplot library (ftp://ftp.astro.caltech.edu/pub/pgplot/pgplot5.2.tar.gz), and the Perl module (http://search.cpan.org/CPAN/authors/ id/K/KG/KGB/PGPLOT-2.18.tar.gz), installed in that order. Is that what you did?

Update: no, looks like the pgplot5.2.tar.gz is not supposed to be necessary. I'm seeing the same error you are (plus a bunch more), but don't know what's the cause.

Replies are listed 'Best First'.
Re^4: installing pgplot on cygwin
by penny (Novice) on Jun 21, 2005 at 01:55 UTC
    Thanks ysth for having a look.. It is really nice to know that I am not doing something
    silly ( though if I was it would be much easy to fix ;-) ).

    It seems to me that be the libpgplot.a libary file may be calling GrWin routines (GWgetrgb
    and varrious others) and are looking for them in the gwdriv.o or gwdriv.c files.
    When I search for these files they have not been down loaded as part of the GrWin driver.

      Did you put the pggw stuff in /usr/local/pgplot? The libpgplot.a in that references GWgetrgb, which is actually provided in libGrWin.a and libGrWin0.a. I don't remember the latter two libraries being linked; you might try adding a -lGrWin switch.
        I installed the pggw0999b-cygwin.exe into my
        c:/cygwin/user/local
        I copied the *.a files to the /usr/local/lib
        (my cygwin didn't have a /usr/lib directory)
        and the *.h files to the /usr/include

        I added the following to the Cygwin.bat file...

        SET PATH=C:\CYGWIN\BIN;C:\CYGWIN\USR\LOCAL\PGPLOT;C:\CYGWIN\GRWIN;%PATH%
        SET PGPLOT_DIR=C:\CYGWIN\USR\LOCAL\PGPLOT

        I am sorry but you will have to baby step me here
        how do you add the -lGrWin switch


        thanks Penny

        Look this may be beyond me unless it is a relative simple fix.
        Thanks again for looking at it. It is good to know that I did follow the instructions properly
        and maybe there is a bigger problem


        Finally got it working...

        Thanks to help from Tsuguhiro TAMARIBUCHI the author of GrWin
        Basically I got Cpan Pgplot module working with GrWin in Cygwin
        by making the following changes to the perl Pgplot module Makefile
        line 37
        LDDLFLAGS = -s -L/usr/local/lib
        change to
        LDDLFLAGS = -s -L/usr/local/lib -Wl,--subsystem,console -mwindows
        I was advised to to use the linker options. -Wl,--subsystem,console -lcpgplot -lpgplot -lGrWin -mwindows
        or
        -Wl,--subsystem,windows -lcpgplot -lpgplot -lGrWin -mwindows
        depending on your application being a console application or a windows application.
        in lines 277-279
        I included the -lGrWin Libary
        EXTRALIBS = -L/usr/local/pgplot -L/usr/local/pgplot -L/usr/local/lib -lcpgplot -lpgplot -lGrWin ......
        LDLOADLIBS = -L/usr/local/pgplot -L/usr/local/pgplot -L/usr/local/lib -lcpgplot -lpgplot -lGrWin ......