You need to link with wsock32.lib. //Magnus
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of srinivasa.n > Sent: Thursday, May 04, 2006 2:33 PM > To: pgsql-general@postgresql.org > Subject: [GENERAL] linker > > Hi I am new to postgre sql I am trying to execute the sample > c code which are connecting to postgre data base > > It is postgre web site, I am not bale to compile that code it > is generating linker error > > Could any body tell how to set lib and dill which are > required to exec cute the following is the > > Error I am getting > > > > libpq.lib(fe-connect.obj) : error LNK2019: unresolved > external symbol [EMAIL PROTECTED] referenced in function _connectDBStart > > libpq.lib(fe-misc.obj) : error LNK2001: unresolved external > symbol [EMAIL PROTECTED] > > libpq.lib(fe-protocol3.obj) : error LNK2001: unresolved > external symbol [EMAIL PROTECTED] > > libpq.lib(fe-connect.obj) : error LNK2019: unresolved > external symbol [EMAIL PROTECTED] referenced in function _PQconnectPoll > > libpq.lib(fe-connect.obj) : error LNK2019: unresolved > external symbol [EMAIL PROTECTED] referenced in function _PQconnectPoll > > libpq.lib(fe-connect.obj) : error LNK2019: unresolved > external symbol [EMAIL PROTECTED] referenced in function > _PQconnectPoll > > libpq.lib(getaddrinfo.obj) : error LNK2001: unresolved > external symbol [EMAIL PROTECTED] > > libpq.lib(fe-misc.obj) : error LNK2001: unresolved external > symbol [EMAIL PROTECTED] > > libpq.lib(thread.obj) : error LNK2001: unresolved external > symbol [EMAIL PROTECTED] > > libpq.lib(fe-connect.obj) : error LNK2019: unresolved > external symbol [EMAIL PROTECTED] referenced in function _PQconnectPoll > > libpq.lib(fe-connect.obj) : error LNK2019: unresolved > external symbol [EMAIL PROTECTED] referenced in function _PQconnectPoll > > libpq.lib(fe-connect.obj) : error LNK2019: unresolved > external symbol [EMAIL PROTECTED] referenced in function > _connectMakeNonblocking > > libpq.lib(fe-connect.obj) : error LNK2019: unresolved > external symbol [EMAIL PROTECTED] referenced in function _connectNoDelay > > libpq.lib(fe-connect.obj) : error LNK2019: unresolved > external symbol [EMAIL PROTECTED] referenced in function > _makeEmptyPGconn > > libpq.lib(fe-connect.obj) : error LNK2019: unresolved > external symbol [EMAIL PROTECTED] referenced in function _makeEmptyPGconn > > libpq.lib(fe-connect.obj) : error LNK2019: unresolved > external symbol [EMAIL PROTECTED] referenced in function _PQrequestCancel > > libpq.lib(fe-secure.obj) : error LNK2001: unresolved external > symbol [EMAIL PROTECTED] > > libpq.lib(fe-connect.obj) : error LNK2019: unresolved > external symbol [EMAIL PROTECTED] referenced in function _PQrequestCancel > > libpq.lib(fe-secure.obj) : error LNK2001: unresolved external > symbol [EMAIL PROTECTED] > > libpq.lib(fe-protocol2.obj) : error LNK2001: unresolved > external symbol [EMAIL PROTECTED] > > libpq.lib(fe-protocol3.obj) : error LNK2001: unresolved > external symbol [EMAIL PROTECTED] > > libpq.lib(inet_aton.obj) : error LNK2001: unresolved external > symbol [EMAIL PROTECTED] > > libpq.lib(fe-connect.obj) : error LNK2019: unresolved > external symbol [EMAIL PROTECTED] referenced in function _PQrequestCancel > > libpq.lib(ip.obj) : error LNK2001: unresolved external symbol [EMAIL > PROTECTED] > > libpq.lib(getaddrinfo.obj) : error LNK2001: unresolved > external symbol [EMAIL PROTECTED] > > libpq.lib(fe-misc.obj) : error LNK2001: unresolved external > symbol [EMAIL PROTECTED] > > libpq.lib(getaddrinfo.obj) : error LNK2019: unresolved > external symbol [EMAIL PROTECTED] referenced in function _pg_getaddrinfo > > libpq.lib(fe-misc.obj) : error LNK2019: unresolved external > symbol [EMAIL PROTECTED] referenced in function _pqGetc > > libpq.lib(getaddrinfo.obj) : error LNK2019: unresolved > external symbol [EMAIL PROTECTED] referenced in function _pg_getnameinfo > > libpq.lib(fe-misc.obj) : error LNK2001: unresolved external > symbol [EMAIL PROTECTED] > > libpq.lib(getaddrinfo.obj) : error LNK2019: unresolved > external symbol [EMAIL PROTECTED] referenced in function _pg_getnameinfo > > libpq.lib(fe-misc.obj) : error LNK2019: unresolved external > symbol [EMAIL PROTECTED] referenced in function _pqGetInt > > libpq.lib(fe-misc.obj) : error LNK2019: unresolved external > symbol [EMAIL PROTECTED] referenced in function _pqSocketPoll > > libpq.lib(thread.obj) : error LNK2019: unresolved external > symbol [EMAIL PROTECTED] referenced in function _pqGethostbyname > > Debug/a.exe : fatal error LNK1120: 19 unresolved externals > > > > Advance thanks > > > > Regards, > > > > Srinivasa, > > > > > > > > ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly