Print

Print


This is a bit off-topic, but in general you do not link with
static .a libraries, but with dynamic .so's. Also, in general
you don't care where the library is: When installed as part
of the Linux distro with apt-get or similar, there are
loader and linker configurations in place so that the
libraries are found with simple -lgiza and similar flags.
Normally there is also no need for -L/path/to/more/libs options.

Debian-type distros split libraries into libwazza and
libwazza-dev packages. The former gives you only the .so,
the latter also the .a and .h. But you would usually still
link against the .so.

On Wed, Dec 19, 2018 at 12:21:09PM +0000, Patrick Wallace - UKRI STFC wrote:
> Hi Ole,
> 
> 
> > I would recommend to use the "giza-dev" package instead of
> > pgplot5.
> 
> Thanks - I shall certainly follow your advice.
> 
> But this is where my ignorance will really start to show!  I
> installed giza-dev, and attempted to build my application, linking
> to the three .a libraries that giza-dev contains, namely
> 
> /usr/lib/i386-linux-gnu/libgiza.a
> /usr/lib/i386-linux-gnu/libcpgplot.a
> /usr/lib/i386-linux-gnu/libpgplot.a
> 
> (The application is Fortran, so I'm not expecting to need
> libcpgplot.a, but for all I know it might be a prerequisite of one
> of the others.)
> 
> The link fails, with this as the first not-found:
> 
> /usr/lib/i386-linux-gnu/libpgplot.a(giza-pgplot.o): In function `pgswin_':
> (.text+0x88): undefined reference to `giza_set_window_float'
> 
> What am I missing?
> 
> 
> Patrick Wallace
> ____________________________________________________________________
> RAL Space                                            +44-1235-531198
> STFC Rutherford Appleton Laboratory
> Harwell Oxford
> Didcot, Oxfordshire, OX11 0QX, UK         [log in to unmask]
> ____________________________________________________________________
> 
> ----
> Starlink User Support list
> For list configuration, including subscribing to and unsubscribing from the list, see
> https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=STARLINK

-- 
  Horst Meyerdierks                 Royal Observatory Edinburgh
  Linux/Network Manager                           [log in to unmask]
  http://www.roe.ac.uk/~hme/                   +44-131-6688-309

----
Starlink User Support list
For list configuration, including subscribing to and unsubscribing from the list, see
https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=STARLINK