Re: Trying to use libpg intrface to postgresql in a windows application. - Mailing list pgsql-interfaces

From jtv
Subject Re: Trying to use libpg intrface to postgresql in a windows application.
Date
Msg-id 20011124190040.K21073@xs4all.nl
Whole thread Raw
In response to Trying to use libpg intrface to postgresql in a windows application.  ("Σίμος Μαυροειδής" <simos@e-shop.gr>)
List pgsql-interfaces
On Sat, Nov 24, 2001 at 07:19:52PM +0200, Simo* Mauroeidy* wrote:
> I use Visual C++ to develop a windows application that communicate using 
> the libq library with a unix Postgresql server .
> I included the libpq-fe.h header file in my source and the libpq.a in the 
> linker files. I try to implement the example files i found in the 
> documentation but they all result to an exception from the debuger at the 
> command trying to connect to the dbase server. ex
> conn = PQsetdb(pghost, pgport, pgoptions, pgtty, dbName);
>
> Could anyone give me one or two tips to get started with?

I don't think you're supposed to include libpq-fe.h.  Try postgresql/libpq++.h
instead.

Or better yet, take a look at my new C++ frontend (not very well-documented
yet, but the examples should show it pretty clearly):

http://members.ams.chello.nl/j.vermeulen31/


-- 
Jeroen



pgsql-interfaces by date:

Previous
From: Tom Lane
Date:
Subject: Re: libpq debug
Next
From: Edward Pilipczuk
Date:
Subject: ECPG error on inserting records to DB