Re: BUG #6203: Building libpq with Visual Studio 9.0 error - Mailing list pgsql-bugs

From Heikki Linnakangas
Subject Re: BUG #6203: Building libpq with Visual Studio 9.0 error
Date
Msg-id 4E70C265.2000209@enterprisedb.com
Whole thread Raw
In response to BUG #6203: Building libpq with Visual Studio 9.0 error  ("Steve" <argonaut@yandex.ru>)
List pgsql-bugs
On 14.09.2011 08:23, Steve wrote:
>
> The following bug has been logged online:
>
> Bug reference:      6203
> Logged by:          Steve
> Email address:      argonaut@yandex.ru
> PostgreSQL version: 9.1.0
> Operating system:   Windows XP SP3 x32
> Description:        Building libpq with Visual Studio 9.0 error
> Details:
>
> When I'm trying to build libpq client library
> with Visual Studio 9.0 (as described in documentation
> section 16.2, I mean executing "nmake /f win32.mak" in
> command string), linking step gives me this error:
>
> "link.exe @C:\DOCUME~1\Admin\LOCALS~1\Temp\nm36.tmp
>   Creating library .\Release\libpqdll.lib and object
>       .\Release\libpqdll.exp
>   libpq.lib(chklocale.obj) : error LNK2019: unresolved
>        external symbol _pgwin32_setlocale referenced in
>        function _pg_get_encoding_from_locale
>   .\Release\libpq.dll : fatal error LNK1120: 1 unresolved
>         externals"

libpq needs to link in win32setlocale.c, but that was neglected in that
makefile used for stand-alone libpq builds. To be honest, I didn't even
know you can build libpq that way until now. I just committed a fix for
that, you can pull the latest sources from the git repository. The patch
I committed is also attached, if you want to just apply it to your
current 9.1.0 sources.

Thanks for the report!

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

Attachment

pgsql-bugs by date:

Previous
From: "Steve"
Date:
Subject: BUG #6203: Building libpq with Visual Studio 9.0 error
Next
From: "Abel Abraham Camarillo Ojeda"
Date:
Subject: BUG #6205: ERROR: temporary tables cannot specify a schema name