From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Igal @ Lucee.org <igal@lucee.org>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Building tds_fdw Extension for Windows 64bit
Date: Thu, 02 Nov 2017 09:05:05 +0100
Message-ID: <1509609905.3268.3.camel@cybertec.at> (raw)
In-Reply-To: <6d349bd6-572b-ce41-0bf7-0fd9baac8af8@lucee.org>
References: <6d349bd6-572b-ce41-0bf7-0fd9baac8af8@lucee.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>
Igal @ Lucee.org wrote:
> After reading Craig's excellent blog post at https://blog.2ndquadrant.com/compiling-postgresql-extensions-visual-studio-windows/ I decided to try and build a real extension - tds_fdw.
> I've set it up in Visual Studio Community 2017, but am getting the following errors:
> Error C2375 'tds_fdw_handler': redefinition; different linkage tds_fdw E:\Workspace\git\tds_fdw\src\tds_fdw.c 118
> Error C2375 'tds_fdw_validator': redefinition; different linkage tds_fdw E:\Workspace\git\tds_fdw\src\tds_fdw.c 156
> Full output:
> 1>------ Rebuild All started: Project: tds_fdw, Configuration: Release x64 ------
> 1>deparse.c
> 1>options.c
> 1>tds_fdw.c
> 1>src\tds_fdw.c(118): error C2375: 'tds_fdw_handler': redefinition; different linkage
> 1>E:\Workspace\git\tds_fdw\include\tds_fdw.h(130): note: see declaration of 'tds_fdw_handler'
> 1>src\tds_fdw.c(156): error C2375: 'tds_fdw_validator': redefinition; different linkage
> 1>E:\Workspace\git\tds_fdw\include\tds_fdw.h(131): note: see declaration of 'tds_fdw_validator'
> 1>Generating Code...
> 1>Done building project "tds_fdw.vcxproj" -- FAILED.
> ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
> I'm not sure if it's related, but the FreeTDS version that I found for Windows is marked as 32bit and I am trying to build for 64bit.
> I believe that extensions like tds_fdw and pgloader will help users on TDS databases to migrate to Postgres and will improve adoption of the project. I will be more than happy to publish my binaries of the extension if I ever get that far.
> Can anyone help?
Based on my experience with oracle_fdw, I would change the function declaration
in tds_fdw.h to
extern PGDLLEXPORT Datum tds_fdw_handler(PG_FUNCTION_ARGS);
Yours,
Laurenz Albe
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: laurenz.albe@cybertec.at, igal@lucee.org
Subject: Re: Building tds_fdw Extension for Windows 64bit
In-Reply-To: <1509609905.3268.3.camel@cybertec.at>
References: <6d349bd6-572b-ce41-0bf7-0fd9baac8af8@lucee.org> <1509609905.3268.3.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox