Re: Cross compile custom data types for Linux and windows

From: Daniel Migowski <dmigowski(at)ikoffice(dot)de>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Cross compile custom data types for Linux and windows
Date: 2013-05-21 07:55:01
Message-ID: 41ED3F5450C90F4D8381BC4D8DF6BBDC746D12E6@EXCHANGESERVER.ikoffice.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

OK, thank you. Then I believe I have to go with a Wine-VisualC setup for that.

Thanks,
Daniel Migowski

-----Ursprüngliche Nachricht-----
Von: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-owner(at)postgresql(dot)org] Im Auftrag von John R Pierce
Gesendet: Dienstag, 21. Mai 2013 08:10
An: pgsql-general(at)postgresql(dot)org
Betreff: Re: [GENERAL] Cross compile custom data types for Linux and windows

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

--
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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Holger Hoffstaette 2013-05-21 11:27:08 Re: Deploying PostgreSQL on CentOS with SSD and Hardware RAID
Previous Message Heikki Linnakangas 2013-05-21 06:32:07 Re: [ODBC] ODBC constructs