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

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.

Replies are listed 'Best First'.
Re^5: installing pgplot on cygwin
by ysth (Canon) on Jun 21, 2005 at 02:31 UTC
    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 ......