Re: pgxs question - linking c-functions to external libraries

From: johnduffy(at)f2s(dot)com
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pgxs question - linking c-functions to external libraries
Date: 2008-05-19 17:23:03
Message-ID: 1211217783.4831b777c4f3e@webmail.freedom2surf.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom

Thanks for the reply. My GSL libraries, 'libgsl' and 'libgslcblas', are in the
/usr/lib directory as GSL and the GSL development files were installed via
Fedora 8 RPM's. I'm a relative newbie to programming, so I thought the -L
switch is only required to add a non-standard library location to the
directories searched for libraries.

I will give it a go.

Thanks

John

Quoting Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:

> johnduffy(at)f2s(dot)com writes:
> > My functions compile fine using PGXS, but don't link against the GSL
> libraries.
> > How do I specify the GSL libraries as external libraries to link against in
> the
> > PGXS Makfile? I have tried the following which don't work:
>
> > PG_CPPFLAGS = -lgsl -lgslcblas
> > PG_LIBS = -lgsl -gslcblas
> > SHLIB_LINK = -lgsl -gslcblas
>
> > My PGXS makefile is:
>
> > MODULES pg_gsl
> > PGXS := $(shell $(PG_CONFIG) --pgxs)
> > include $(PGXS)
>
> SHLIB_LINK is the right thing for MODULES. Maybe you forgot a -L
> switch?
>
> regards, tom lane
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2008-05-19 17:26:37 Re: Vacuuming on heavily changed databases
Previous Message Sam Mason 2008-05-19 17:21:18 Re: Vacuuming on heavily changed databases