From: | Julia Jacobson <julia(dot)jacobson(at)arcor(dot)de> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net> |
Subject: | Re: Linking against static libpq using Visual C++ |
Date: | 2011-02-27 21:10:00 |
Message-ID: | 4D6ABDA8.1010207@arcor.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thanks again for your answer.
For all those experiencing similar problems, the missing libraries were:
1) ws2_32.lib
2) secur32.lib (for the SSPI functions)
My code is compiled now without errors, but it seems to contain a buffer
overflow. So there's still some work left for me ...
On Sun, Feb 27, 2011 at 19:00, Magnus Hagander wrote:
> On Sun, Feb 27, 2011 at 18:01, Julia Jacobson<julia(dot)jacobson(at)arcor(dot)de> wrote:
>> Thanks for your answer. I was indeed using the static libpq version from the
>> installer.
>> I tried to compile my own one with Visual Studio 2010, but this caused a lot
>> of problems due to the fact that Visual Studio 2010 has changed the manifest
>> tool.
>> So I built a static version using Visual C++ 2008, which worked without
>> problems.
>> However, when building my application with Visual C++ 2008, the following
>> errors are lamented:
>>
>> 1>libpq.lib(fe-connect.obj) : error LNK2019: Unresolved external reference
>> "__imp__WSAIoctl(at)36" in Funktion "_setKeepalivesWin32".
>> 1>libpq.lib(ip.obj) : error LNK2001: Unvresolved external symbol
>> "__imp__WSAIoctl(at)36".
>> 1>libpq.lib(fe-connect.obj) : error LNK2019: Unresolved external reference
>> "__imp__DeleteSecurityContext(at)4" in Funktion "_closePGconn".
>> 1>libpq.lib(fe-connect.obj) : error LNK2019: Unresolved external reference
>> "__imp__FreeCredentialsHandle(at)4" in Funktion "_closePGconn".
>> 1>libpq.lib(ip.obj) : error LNK2019: Unresolved external reference
>> "__imp__WSASocketA(at)24" in Funktion "_pg_foreach_ifaddr".
>> 1>libpq.lib(fe-auth.obj) : error LNK2019: Unresolved external reference
>> "_FreeContextBuffer(at)4" in Funktion "_pg_SSPI_continue".
>> 1>libpq.lib(fe-auth.obj) : error LNK2019: Unresolved external reference
>> "_InitializeSecurityContextA(at)48" in Funktion "_pg_SSPI_continue".
>> 1>libpq.lib(fe-auth.obj) : error LNK2019: Unresolved external reference
>> "_AcquireCredentialsHandleA(at)36" in Funktion "_pg_SSPI_startup".
>> 1>C:\Users\Julia\Desktop\db_con\Debug\db_con.exe : fatal error LNK1120: 7
>> Unresolved external references.
>>
>> Which libraries are missing now?
>
> At least one of those is winsock, thus probably wsock2_32 or something
> like that. The SSPI stuff is from some other system library, don't
> know offhand which. You can look up the missing function in the MSDN
> documentation, it should list which .lib is needed to access it.
From | Date | Subject | |
---|---|---|---|
Next Message | Jens Wilke | 2011-02-27 21:35:28 | Re: Hot Standby - ERROR: canceling statement due to conflict with recovery |
Previous Message | Andrew Sullivan | 2011-02-27 20:57:31 | Re: PG on two nodes with shared disk ocfs2 & drbd |