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

Поиск
Список
Период
Сортировка
От Alan Nilsson
Тема Re: pgxs question - linking c-functions to external libraries
Дата
Msg-id B16F0EC9-E1F8-4496-8EC1-B7A33AFCC6A3@apple.com
обсуждение исходный текст
Ответ на Re: pgxs question - linking c-functions to external libraries  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Awesome - thanks Tom, works.

alan

> On Dec 12, 2014, at 1:06 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Alan Nilsson <anilsson@apple.com> writes:
>> I am trying to link libuuid into a custom extension, here is my make file (building PG 9.3.5 on CentOS 6.5 (GCC
4.4.7)fwiw): 
>
>> MODULES = aitpowerpg
>> EXTENSION = aitpowerpg
>> DATA = aitpowerpg--1.0.sql
>
>> SHLIB_LINK += -luuid
>
>> ifdef USE_PGXS
>> PG_CONFIG = pg_config
>> PGXS := $(shell $(PG_CONFIG) --pgxs)
>> include $(PGXS)
>> else
>> subdir = contrib/aitpowerpg
>> top_builddir = ../..
>> include $(top_builddir)/src/Makefile.global
>> include $(top_srcdir)/contrib/contrib-global.mk
>> endif
>
>> The line SHLIB_LINK += -luuid has no effect.
>
> I'm not sure how well documented this is, but pgxs.mk quoth
>
> #   SHLIB_LINK -- will be added to MODULE_big link line
>
> Since you're using the MODULES target not the MODULE_big target, it gets
> left out.  Try following the pattern in the contrib/uuid-ossp Makefile.
>
>             regards, tom lane



В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgxs question - linking c-functions to external libraries
Следующее
От: Daniel Begin
Дата:
Сообщение: Re: Removing duplicate records from a bulk upload (rationale behind selecting a method)