trying to compile libpq with VS 2005 and static runtime

From: Marc-André Lalonde <marcandrelalonde(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: trying to compile libpq with VS 2005 and static runtime
Date: 2010-08-17 19:02:07
Message-ID: 4C6ADCAF.8090804@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to compile libpq from the 8.4.4 source to use the static
runtime (/MT) with VS 2005, but it fails on dosmaperr being redefined in
win32error.c

Here is the error message.
LIBCMT.lib(dosmap.obj) : error LNK2005: __dosmaperr already defined in
libpq.lib(win32error.obj)
fatal error LNK1169: one or more multiply defined symbols found

I can comment out _dosmaperr in port/win32error.c to make it work, but I
would like to know if it will have any adverse effects for a libpq client.

I want to link with the static runtime so that I don't have to provide
an installer to install the VC redist package.

Thanks for the help.

Marc-Andé Lalonde

Browse pgsql-general by date

  From Date Subject
Next Message Lazaro Ruben Garcia Martinez 2010-08-17 19:19:14 database cluster!!!
Previous Message Alban Hertroys 2010-08-17 17:17:04 Re: Using concatenation operator