Re: How can I run installcheck using powershell ?

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Dave Cramer <davecramer(at)gmail(dot)com>
Cc: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: How can I run installcheck using powershell ?
Date: 2016-07-20 01:20:59
Message-ID: CAB7nPqT1PJT8Np8Ky-wDMJ0qFacn0Y0JOORydutJ5midnWOBnQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

On Wed, Jul 20, 2016 at 9:55 AM, Dave Cramer <davecramer(at)gmail(dot)com> wrote:
> Here is the complete link error
>
> link.exe @C:\Users\DAVECR~1\AppData\Local\Temp\nm45D.tmp
> Creating library .\_Unicode_Release\psqlodbc35w.lib and object
> .\_Unicode_Release\psqlodbc35w.exp
> odbccp32.lib(dllload.obj) : error LNK2019: unresolved external symbol
> __vsnwprintf_s referenced in function _StringCchPrintfW
> .\_Unicode_Release\psqlodbc35w.dll : fatal error LNK1120: 1 unresolved
> externals
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
> 14.0\VC\BIN\link.exe"' : return code '0x460'

OK, I can see it. After some research, VS is, as usual, a pain to work with:
https://connect.microsoft.com/VisualStudio/feedback/details/1134693/vs-2015-ctp-5-c-vsnwprintf-s-and-other-functions-are-not-exported-in-appcrt140-dll-breaking-linkage-of-static-libraries
In this case it seems that __vsnwprintf_s is not DLL-exported, causing
the linking error. And a solution is to add
legacy_stdio_definitions.lib to fix that where odbccp32.lib is listed.
Like in the patch attached.

You could as well enforce the presence of this lib in CUSTOMLINKLIBS,
but I'd rather see win64.mak support natively the newest versions of
VS instead of the old ones.
--
Michael

Attachment Content-Type Size
pgodbc-vs2015-fix.patch invalid/octet-stream 1.3 KB

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Tom Lane 2016-07-20 01:24:57 Re: How can I run installcheck using powershell ?
Previous Message Dave Cramer 2016-07-20 00:55:52 Re: How can I run installcheck using powershell ?