From: | deepak <deepak(dot)pn(at)gmail(dot)com> |
---|---|
To: | Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Building extensions on Windows using VS2008 |
Date: | 2011-02-20 12:43:48 |
Message-ID: | AANLkTikJVhDs1nR23Ed_uePGjE8xC_td22rKidQ_9Qbc@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Kretschmer | 2011-02-20 13:41:16 | Re: Questions about octal vs. hex for bytea |
Previous Message | Dmitriy Igrishin | 2011-02-20 11:38:37 | Disconnecting idle connections on timeout. |