Re: Cross compile custom data types for Linux and windows - Mailing list pgsql-general

From John R Pierce
Subject Re: Cross compile custom data types for Linux and windows
Date
Msg-id 519B0FB4.6030201@hogranch.com
Whole thread Raw
In response to Cross compile custom data types for Linux and windows  (Daniel Migowski <dmigowski@ikoffice.de>)
Responses Re: Cross compile custom data types for Linux and windows
List pgsql-general
On 5/20/2013 10:58 PM, Daniel Migowski wrote:
> I intend to create some native data types for PostgreSQL, but since
> our servers run on Windows and Linux, I would have to compile the
> libraries for Windows and for Linux (will need nothing else than the
> standard C libs). Our build server is a Debian 6 Linux system. Is
> there a way to also create the Windows libraries on it, or do I need
> to have a Windows system with Visual C++ for that?

mixing C code from different compilers can be problematic.

if you want your extension modules to run with the windows binary
versions built by enterpriseDB, you'll need to use VisualC (plain C, no
C++), even the free express version is fine for this.

you could, in theory, setup a cross compile environment on Linux that
would let you use gcc to build both postgres and your extensions, but
then you'd be dealing with your own build of Postgres for Windows.
Also, setting up that environment would probably take a lot of
tinkering, and PostgreSQL on Windows with GCC is not considered a
supported platform at present (although people do successfully build it)



--
john r pierce                                      37N 122W
somewhere on the middle of the left coast



pgsql-general by date:

Previous
From: Atri Sharma
Date:
Subject: Re: ODBC constructs
Next
From: John R Pierce
Date:
Subject: Re: ODBC constructs