Re: C User Defined Functions

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: C User Defined Functions
Дата
Msg-id 52D110C8.2070500@2ndquadrant.com
обсуждение исходный текст
Ответ на C User Defined Functions  (Jake Silverman <jakerosssilv@gmail.com>)
Список pgsql-general
> Hey,
>
> I was trying to compile a user-defined function in C (I am trying to
> compile one of the examples given in chapter 35.9 of the 9.3beta2
> documentation) using Microsoft Visual Studio Express 2012 on a 64-bit
> Windows 7 computer.
>
> I ran into the following error:
>
> C:\>cl /I "C:\postgres9.3beta2FI\include\server" /I
> "C:\postgres9.3beta2FI\include\server" /c "testFuncss.c"
> Microsoft (R) C/C++ Optimizing Compiler Version 17.00.50727.1 for x64
> Copyright (C) Microsoft Corporation.  All rights reserved.
>
> testFuncss.c
> c:\postgres9.3beta2fi\include\server\pg_config_os.h(207) : error C2011:
> 'timezone' : 'struct' type redefinition
>         c:\postgres9.3beta2fi\include\server\pg_config_os.h(207) : see
> declaration of 'timezone'
> c:\postgres9.3beta2fi\include\server\pg_config_os.h(216) : error C2011:
> 'itimerval' : 'struct' type redefinition
>         c:\postgres9.3beta2fi\include\server\pg_config_os.h(216) : see
> declaration of 'itimerval'


This turns out to be a header bug of sorts. To work around it define
WIN32 in your project file.

I've added information about this, and the next error you mention, to
the wiki:
https://wiki.postgresql.org/wiki/Building_and_Installing_PostgreSQL_Extension_Modules

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_upgrade & tablespaces
Следующее
От: Seref Arikan
Дата:
Сообщение: Do you have any best practices for managing large file's metadata with postgres?