Re: How can I run installcheck using powershell ? - Mailing list pgsql-odbc

From Michael Paquier
Subject Re: How can I run installcheck using powershell ?
Date
Msg-id CAB7nPqT1PJT8Np8Ky-wDMJ0qFacn0Y0JOORydutJ5midnWOBnQ@mail.gmail.com
Whole thread Raw
In response to Re: How can I run installcheck using powershell ?  (Dave Cramer <davecramer@gmail.com>)
List pgsql-odbc
On Wed, Jul 20, 2016 at 9:55 AM, Dave Cramer <davecramer@gmail.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

pgsql-odbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: How can I run installcheck using powershell ?
Next
From: Tom Lane
Date:
Subject: Re: How can I run installcheck using powershell ?