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

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

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 Bohdan Linda 2008-05-19 14:50:18 Vacuuming on heavily changed databases
Previous Message johnduffy 2008-05-19 12:39:23 pgxs question - linking c-functions to external libraries