Re: Libpq linker error - Mailing list pgsql-interfaces

From Jeroen T. Vermeulen
Subject Re: Libpq linker error
Date
Msg-id 20040211162958.GE94664@xs4all.nl
Whole thread Raw
In response to Libpq linker error  (Daniel Gerardo Lucero Baylon <daniel_baylon@yahoo.com>)
List pgsql-interfaces
On Wed, Feb 11, 2004 at 07:46:04AM -0800, Daniel Gerardo Lucero Baylon wrote:
> I compiled PostgreSQL 7.3.4 libpq for Win 32 using VC++ 7 compiler.
> 
> Compiler generates a libpq.lib file. Build a simple C program which opens and
> closes a database connection.
> 
> When try to link object program and libpq library, following error occurs:
> 
> ibpq.lib(fe-connect.obj) : error LNK2019: unresolved external symbol
> __imp__strdup referenced in function _PQconnectStart

Looks like you may not be linking your program against the standard
system libraries.  In this example, PQconnectStart is who's complaining
about a missing function--it's not the function being complained about.


Jeroen



pgsql-interfaces by date:

Previous
From: Daniel Gerardo Lucero Baylon
Date:
Subject: Libpq linker error
Next
From: Daniel Gerardo Lucero Baylon
Date:
Subject: How to compile