Building extensions on Windows using VS2008

From: deepak <deepak(dot)pn(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Building extensions on Windows using VS2008
Date: 2011-02-14 22:28:36
Message-ID: AANLkTik11XD=GWSHdB5kJ2AYYru9saxmDm1dG6Qhya1U@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

Although, I can get a DLL by including the header files from postgres, that
DLL is quite not usable. When I try to create a function inside
psql, I get an error such as:
ERROR: could not find function "<function-name>" in file <dll-name>

Although the same C source file can be built using MinGW and is usable that
way. I don't want to use MinGW as I learn that it supports
only 32-bit binaries (which has performance implications).

Here is the CL command line I'm using to compile:
cl /I \pgsql\include\server /I \pgsql\include\server\port\win32 /LD
\pgsql\lib\postgres.lib <c-filename>

--
Deepak

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-02-15 00:04:33 Re: Alter Default Privileges Does Not Work For Functions
Previous Message David Johnston 2011-02-14 22:15:54 Alter Default Privileges Does Not Work For Functions