Re: [GENERAL] Building extensions on Windows using VS2008

2011-02-20 Thread Tom Lane
deepak 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 > #include > #include "postgres.h" > #include "fmgr.h" As was noted upthrea

Re: [GENERAL] Building extensions on Windows using VS2008

2011-02-20 Thread deepak
> 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 exte

Re: [GENERAL] Building extensions on Windows using VS2008

2011-02-20 Thread Magnus Hagander
On Sun, Feb 20, 2011 at 05:39, Craig Ringer wrote: > On 02/20/2011 09:38 AM, deepak wrote: >> >> >>    build.pl parses the Makefile to determine the list >>    of sources, etc. Essentially, your extension is built using the unix >>    Makefile.  Since you've already built Pg its

Re: [GENERAL] Building extensions on Windows using VS2008

2011-02-19 Thread Craig Ringer
On 02/20/2011 09:38 AM, deepak wrote: build.pl parses the Makefile to determine the list of sources, etc. Essentially, your extension is built using the unix Makefile. Since you've already built Pg its self from sources you will have used build.pl

Re: [GENERAL] Building extensions on Windows using VS2008

2011-02-19 Thread deepak
> > build.pl parses the Makefile to determine the list of sources, etc. > Essentially, your extension is built using the unix Makefile. Since you've > already built Pg its self from sources you will have used build.pl to do > it (right?) and it'll be easy for you to add the contrib module and re-r

Re: [GENERAL] Building extensions on Windows using VS2008

2011-02-19 Thread Craig Ringer
On 02/20/2011 05:30 AM, deepak wrote: Thanks for the information.. However, I'm still unable to figure how to do a clean build of extensions on Windows using VS 2008. To start with, the main contrib module doesn't seem to have a nmake-compatible Makefile, and I don't seem to find any project un

Re: [GENERAL] Building extensions on Windows using VS2008

2011-02-19 Thread deepak
Thanks for the information.. However, I'm still unable to figure how to do a clean build of extensions on Windows using VS 2008. To start with, the main contrib module doesn't seem to have a nmake-compatible Makefile, and I don't seem to find any project under 'contrib' which has a Windows-compat

Re: [GENERAL] Building extensions on Windows using VS2008

2011-02-14 Thread Craig Ringer
On 15/02/11 06:28, deepak wrote: > Hi! > > I was trying to build PostgreSQL 9.0.1 using VS2008. I am having > problems building the C extensions. I could build the main package, though. The easiest way to do it on Windows is to make a new `contrib' module and compile as part of the main build.