From: | George Oakman <oakmang(at)hotmail(dot)com> |
---|---|
To: | <craig(at)postnewspapers(dot)com(dot)au> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: C++ User-defined functions |
Date: | 2009-03-11 13:05:34 |
Message-ID: | COL115-W536FBE8AF4CA0A5C6EF819AF9E0@phx.gbl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
Thank you Craig and Magnus for your answers.
I have tried compiling with Visual Studio 2005 and I'm still getting those errors:
c:\program files\postgresql\8.3\include\server\pg_config_os.h(188) : error C2011: 'timezone' : 'struct' type redefinition
c:\program files\postgresql\8.3\include\server\pg_config_os.h(188) : see declaration of 'timezone'
c:\program files\postgresql\8.3\include\server\pg_config_os.h(197) : error C2011: 'itimerval' : 'struct' type redefinition
c:\program files\postgresql\8.3\include\server\pg_config_os.h(197) : see declaration of 'itimerval'
Any advice most welcome.
Thanks,
George.
> Date: Tue, 10 Mar 2009 11:42:39 +0900
> From: craig(at)postnewspapers(dot)com(dot)au
> To: magnus(at)hagander(dot)net
> CC: oakmang(at)hotmail(dot)com; pgsql-general(at)postgresql(dot)org
> Subject: Re: [GENERAL] C++ User-defined functions
>
> Magnus Hagander wrote:
> > George Oakman wrote:
> >> Thanks Craig,
> >>
> >> I'm trying to compile a very simple test with Visual Studio (2008), but
> >> I get the following errors:
> >
> > The PostgreSQL backend and header files are not compatible with Visual
> > Studio 2008. At least they're not tested wit hit. You need to try Visual
> > Studio 2005.
>
> You should build your extension with the same version of VC++ as the Pg
> server was built with anyway, and at the moment that means 2005 if
> you're using a stock binary distribution. Otherwise you may encounter
> problems with mismatched C runtime libraries, resulting in exciting
> problems with memory management, file handles, and other things. IIRC
> Pg's use of palloc() should actually avoid the problems with memory
> being allocated in one DLL then free()'d in another, but I'd still be wary.
>
> >> c:\program files\postgresql\8.3\include\server\c.h(97) : fatal error
> >> C1083: Cannot open include file: 'libintl.h': No such file or directory
> >>
> >> I must be doing something wrong - I don't even have a libintl.h on my
> >> drive...
>
> For some reason the Pg binary distribution doesn't include the headers
> for gettext, despite the public backend headers requiring them. (IMO it
> really should).
>
> I actually landed up making a dummy libintl.h since I wasn't actually
> linking to or using any of the gettext functions, but it'd be much
> better to have the correct headers - as noted below:
>
> > libintlh. is part of gettext, which is a dependency from the binary
> > version of pg. You can either get the whole sourcetree and reconfigure
> > it without gettext, or install gettext.
>
> --
> Craig Ringer
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
_________________________________________________________________
View your Twitter and Flickr updates from one place – Learn more!
http://clk.atdmt.com/UKM/go/137984870/direct/01/
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2009-03-11 14:01:22 | Re: tsearch2 dictionary for statute cites |
Previous Message | Merlin Moncure | 2009-03-11 12:52:20 | Re: ERROR: table row type and query-specified row type do not match |