Re: Building extensions on Windows using VS2008

Поиск
Список
Период
Сортировка
От deepak
Тема Re: Building extensions on Windows using VS2008
Дата
Msg-id AANLkTikJVhDs1nR23Ed_uePGjE8xC_td22rKidQ_9Qbc@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Building extensions on Windows using VS2008  (Craig Ringer <craig@postnewspapers.com.au>)
Ответы Re: Building extensions on Windows using VS2008  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general

OK, so you're building it within the main Pg build system. Pg was successfully compiled, including files that use elog.h . Yet your extension doesn't compile, complaining about a macro/typedef conflict.

This makes me wonder: what's different?

Can you post the full sources of your extension, including the Makefile?

--
Craig Ringer

Here's the trimmed down version of the source and the Makefile (copied and modified from the 'cube' contrib project)
(with which I see the error related to redefinition)

/* myext.c */

#include <string.h>
#include <math.h>
#include "postgres.h"
#include "fmgr.h"

#ifdef PG_MODULE_MAGIC
PG_MODULE_MAGIC;
#endif

PG_FUNCTION_INFO_V1(total_seconds);
PGDLLEXPORT Datum total_seconds(PG_FUNCTION_ARGS) {
    PG_RETURN_INT64(0);
}


# Makefile

MODULE_big = myext
OBJS= myext.o

DATA_built = myext.sql
DATA = uninstall_myext.sql
REGRESS = myext

SHLIB_LINK += $(filter -lm, $(LIBS))

ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/myext
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif


myext.o: myext.c

clean:
    rm -f myext.o

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

Предыдущее
От: "Reuven M. Lerner"
Дата:
Сообщение: Questions about octal vs. hex for bytea
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: Questions about octal vs. hex for bytea