linker

From: "srinivasa(dot)n" <srinivasa(dot)n(at)webyog(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: linker
Date: 2006-05-04 12:33:11
Message-ID: 20060504124024.4A5229F946D@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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
_closesocket(at)4 referenced in function _connectDBStart

libpq.lib(fe-misc.obj) : error LNK2001: unresolved external symbol
_closesocket(at)4

libpq.lib(fe-protocol3.obj) : error LNK2001: unresolved external symbol
_closesocket(at)4

libpq.lib(fe-connect.obj) : error LNK2019: unresolved external symbol
_getsockname(at)12 referenced in function _PQconnectPoll

libpq.lib(fe-connect.obj) : error LNK2019: unresolved external symbol
_getsockopt(at)20 referenced in function _PQconnectPoll

libpq.lib(fe-connect.obj) : error LNK2019: unresolved external symbol
_WSAGetLastError(at)0 referenced in function _PQconnectPoll

libpq.lib(getaddrinfo.obj) : error LNK2001: unresolved external symbol
_WSAGetLastError(at)0

libpq.lib(fe-misc.obj) : error LNK2001: unresolved external symbol
_WSAGetLastError(at)0

libpq.lib(thread.obj) : error LNK2001: unresolved external symbol
_WSAGetLastError(at)0

libpq.lib(fe-connect.obj) : error LNK2019: unresolved external symbol
_connect(at)12 referenced in function _PQconnectPoll

libpq.lib(fe-connect.obj) : error LNK2019: unresolved external symbol
_socket(at)12 referenced in function _PQconnectPoll

libpq.lib(fe-connect.obj) : error LNK2019: unresolved external symbol
_ioctlsocket(at)12 referenced in function _connectMakeNonblocking

libpq.lib(fe-connect.obj) : error LNK2019: unresolved external symbol
_setsockopt(at)20 referenced in function _connectNoDelay

libpq.lib(fe-connect.obj) : error LNK2019: unresolved external symbol
_WSASetLastError(at)4 referenced in function _makeEmptyPGconn

libpq.lib(fe-connect.obj) : error LNK2019: unresolved external symbol
_WSAStartup(at)8 referenced in function _makeEmptyPGconn

libpq.lib(fe-connect.obj) : error LNK2019: unresolved external symbol
_recv(at)16 referenced in function _PQrequestCancel

libpq.lib(fe-secure.obj) : error LNK2001: unresolved external symbol
_recv(at)16

libpq.lib(fe-connect.obj) : error LNK2019: unresolved external symbol
_send(at)16 referenced in function _PQrequestCancel

libpq.lib(fe-secure.obj) : error LNK2001: unresolved external symbol
_send(at)16

libpq.lib(fe-protocol2.obj) : error LNK2001: unresolved external symbol
_htonl(at)4

libpq.lib(fe-protocol3.obj) : error LNK2001: unresolved external symbol
_htonl(at)4

libpq.lib(inet_aton.obj) : error LNK2001: unresolved external symbol
_htonl(at)4

libpq.lib(fe-connect.obj) : error LNK2019: unresolved external symbol
_htonl(at)4 referenced in function _PQrequestCancel

libpq.lib(ip.obj) : error LNK2001: unresolved external symbol _htonl(at)4

libpq.lib(getaddrinfo.obj) : error LNK2001: unresolved external symbol
_htonl(at)4

libpq.lib(fe-misc.obj) : error LNK2001: unresolved external symbol _htonl(at)4

libpq.lib(getaddrinfo.obj) : error LNK2019: unresolved external symbol
_htons(at)4 referenced in function _pg_getaddrinfo

libpq.lib(fe-misc.obj) : error LNK2019: unresolved external symbol _htons(at)4
referenced in function _pqGetc

libpq.lib(getaddrinfo.obj) : error LNK2019: unresolved external symbol
_ntohs(at)4 referenced in function _pg_getnameinfo

libpq.lib(fe-misc.obj) : error LNK2001: unresolved external symbol _ntohs(at)4

libpq.lib(getaddrinfo.obj) : error LNK2019: unresolved external symbol
_inet_ntoa(at)4 referenced in function _pg_getnameinfo

libpq.lib(fe-misc.obj) : error LNK2019: unresolved external symbol _ntohl(at)4
referenced in function _pqGetInt

libpq.lib(fe-misc.obj) : error LNK2019: unresolved external symbol
_select(at)20 referenced in function _pqSocketPoll

libpq.lib(thread.obj) : error LNK2019: unresolved external symbol
_gethostbyname(at)4 referenced in function _pqGethostbyname

Debug/a.exe : fatal error LNK1120: 19 unresolved externals

Advance thanks

Regards,

Srinivasa,

Responses

  • Re: linker at 2006-05-04 12:52:54 from Martijn van Oosterhout

Browse pgsql-general by date

  From Date Subject
Next Message Reid Thompson 2006-05-04 12:49:19 Re: How does an application recognize the death of the
Previous Message Martijn van Oosterhout 2006-05-04 11:34:58 Re: Segfaults with 8.1.3 on amd64