Skip site navigation (1) Skip section navigation (2)

Re: BUG #6203: Building libpq with Visual Studio 9.0 error

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Steve <argonaut(at)yandex(dot)ru>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6203: Building libpq with Visual Studio 9.0 error
Date: 2011-09-14 15:04:05
Message-ID: 4E70C265.2000209@enterprisedb.com (view raw or flat)
Thread:
Lists: 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(at)yandex(dot)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: fix-libpq-win-build.patch
Description: text/x-diff (1.6 KB)

In response to

pgsql-bugs by date

Next:From: Brar PieningDate: 2011-09-14 19:49:54
Subject: Re: Problem with the 9.1 one-click installer Windows7 64bit
Previous:From: pasmanDate: 2011-09-14 09:15:54
Subject: BUG #6204: Using plperl functions generate crash

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group