pgxs question - linking c-functions to external libraries

From: johnduffy(at)f2s(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: pgxs question - linking c-functions to external libraries
Date: 2008-05-19 12:39:23
Message-ID: 1211200763.483174fba176f@webmail.freedom2surf.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

I have written a number of C-Function which compile and link against the GNU
Scientific Library libraries 'libgsl' and 'libgslcblas' when using a hand
written Makefile, but I would like to use PGXS.

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)

Many thanks
John

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-05-19 14:17:41 Re: pgxs question - linking c-functions to external libraries
Previous Message ${spencer} 2008-05-19 11:57:44 Re: writing a function without installing a language