Re: Compiling pgsql C/C++ interfaces on Win not using Cygwin

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tomáš Vondra <vondra(at)tesmail(dot)cz>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Compiling pgsql C/C++ interfaces on Win not using Cygwin
Date: 2002-08-30 15:42:24
Message-ID: 200208301542.g7UFgOt02522@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


This means you didn't include libpq.a in your link line.

---------------------------------------------------------------------------

Tom Vondra wrote:
> Hello everybody,
> is it possible to compile postgres C/C++ interfaces (use libpq or
> libpq++ in a client application) on Windows not using Cygwin?
>
> I've just tried to compile some examples from 7.2.1 using MS Visual
> C++ 6, but I got lot of "uresolved external symbol" errors when
> linking, for example:
>
> testlibpq2.obj : error LNK2001: unresolved external symbol _PQfinish
> testlibpq2.obj : error LNK2001: unresolved external symbol _PQnotifies
> testlibpq2.obj : error LNK2001: unresolved external symbol _PQclear
> testlibpq2.obj : error LNK2001: unresolved external symbol _PQresultStatus
> testlibpq2.obj : error LNK2001: unresolved external symbol _PQexec
> testlibpq2.obj : error LNK2001: unresolved external symbol _PQerrorMessage
> testlibpq2.obj : error LNK2001: unresolved external symbol _PQstatus
> testlibpq2.obj : error LNK2001: unresolved external symbol _PQsetdbLogin
>
> I think it means some important libraries are missing (at least I
> think it means this).
>
> I don't wan't to compile all the server, just the part necessarry
> to use in a client app. I don't want to use ODBC, I'd like to use
> native access to database. If there's such a way?
>
> Tomas
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Crercio O. Silva 2002-08-30 18:20:49 Re: Compiling pgsql C/C++ interfaces on Win not using Cygwin
Previous Message Christoph Dalitz 2002-08-30 15:41:21 Re: ALTER USER versus GRANT/REVOKE