| От | Tom Lane |
|---|---|
| Тема | Re: Building extensions on Windows using VS2008 |
| Дата | |
| Msg-id | 29143.1298216671@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Building extensions on Windows using VS2008 (deepak <deepak.pn@gmail.com>) |
| Список | pgsql-general |
deepak <deepak.pn@gmail.com> writes:
> 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"
As was noted upthread, this ordering is pretty unsafe. postgres.h
should always be included *first* in any C file that's meant to run in
the backend environment. There are platforms in which failing to do so
causes crashes because of 32-vs-64-bit issues. Not sure if this
explains your Windows issue too, but in any case the above is wrong.
> myext.o: myext.c
> clean:
> rm -f myext.o
BTW, these rules are unnecessary --- having listed myext.o in OBJS is
sufficient.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера