Re: Libpq linker error

From: "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl>
To: Daniel Gerardo Lucero Baylon <daniel_baylon(at)yahoo(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Libpq linker error
Date: 2004-02-11 16:29:58
Message-ID: 20040211162958.GE94664@xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Daniel Gerardo Lucero Baylon 2004-02-11 17:12:33 How to compile
Previous Message Daniel Gerardo Lucero Baylon 2004-02-11 15:46:04 Libpq linker error