From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Igor Korot <ikorot01(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Link errors |
Date: | 2017-05-05 10:47:10 |
Message-ID: | CABUevEyOQRE3KMp1qUAXKVe7jC45wWPnqx0hWdgLBSVq1-1nrQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, May 5, 2017 at 1:30 AM, Igor Korot <ikorot01(at)gmail(dot)com> wrote:
> Hi,
> [code]
> 1> Creating library vc_mswuddll\postgres_dll.lib and object
> vc_mswuddll\postgres_dll.exp
> 1>libpqd.lib(fe-connect.obj) : error LNK2019: unresolved external
> symbol __imp__WSAIoctl(at)36 referenced in function _setKeepalivesWin32
> 1>libpqd.lib(ip.obj) : error LNK2001: unresolved external symbol
> __imp__WSAIoctl(at)36
> 1>libpqd.lib(fe-connect.obj) : error LNK2019: unresolved external
> symbol __imp__DeleteSecurityContext(at)4 referenced in function
> _closePGconn
> 1>libpqd.lib(fe-connect.obj) : error LNK2019: unresolved external
> symbol __imp__FreeCredentialsHandle(at)4 referenced in function
> _closePGconn
> 1>libpqd.lib(fe-auth.obj) : error LNK2019: unresolved external symbol
> _FreeContextBuffer(at)4 referenced in function _pg_SSPI_continue
> 1>libpqd.lib(fe-auth.obj) : error LNK2019: unresolved external symbol
> _InitializeSecurityContextA(at)48 referenced in function
> _pg_SSPI_continue
> 1>libpqd.lib(fe-auth.obj) : error LNK2019: unresolved external symbol
> _AcquireCredentialsHandleA(at)36 referenced in function _pg_SSPI_startup
> 1>libpqd.lib(ip.obj) : error LNK2019: unresolved external symbol
> __imp__WSASocketA(at)24 referenced in function _pg_foreach_ifaddr
> 1>..\dbhandler\vc_mswuddll\postgres_dll.dll : fatal error LNK1120: 7
> unresolved externals
>
> [/code]
>
> And I'm linking with following libraries:
>
> kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;
> winmm.lib;shell32.lib;shlwapi.lib;comctl32.lib;ole32.lib;
> oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;version.lib;
> wsock32.lib;wininet.lib;%(
>
> What am I missing? I am linking with wsock32.lib...
>
I suggest you try building it with the supported method (the msvc build
system in src/tools/msvc), and then inspect the difference.
You can also look up those references in the Microsoft docs (for each API
function there is a listing at the bottom of the page telling you which
header and library is needed). From doing that, AFAICT, you are missing
ws2_32.lib and secur32.lib.
--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Janes | 2017-05-05 15:49:16 | Re: Caching and Blobs in PG? Was: Can PG replace redis, amqp, s3 in the future? |
Previous Message | Adrian Klaver | 2017-05-05 04:05:07 | Re: Where is the libpg on OSX? |