Link error on Release mode

From: Igor Korot <ikorot01(at)gmail(dot)com>
To: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Link error on Release mode
Date: 2024-11-28 06:00:13
Message-ID: CA+FnnTy_SCFqLxbV61pijyjiUaV7rkQ=BKhbT3DcowuW6L4ryw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi, ALL.
Today for the first time I tried to build my software in
Release mode.

This is the command MSVC generates:

/OUT:"..\dbhandler\vc_mswudll\postgres_dll.dll" /MANIFEST /NXCOMPAT
/PDB:"vc_mswudll\my_dll.pdb" /DYNAMICBASE "dbinterface.lib"
"libpq.lib" "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" "WS2_32.lib" "wininet.lib" "Secur32.lib"
"odbc32.lib" "odbccp32.lib" /IMPLIB:"vc_mswudll\my_dll.lib" /DEBUG
/DLL /MACHINE:X86 /OPT:REF /SAFESEH /INCREMENTAL:NO
/PGD:"vc_mswudll\postgres.pgd" /MANIFESTUAC:"level='asInvoker'
uiAccess='false'"
/ManifestFile:"vc_mswudll\my_dll\postgres.dll.intermediate.manifest"
/OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /LIBPATH:"..\dbhandler\Release"
/LIBPATH:"..\libpg\src\interfaces\libpq\Release" /LIBPATH:"C:\Program
Files (x86)\Visual Leak Detector\lib\Win32" /TLBID:1

And this is what I got:

1>libpq.lib(dirmod.obj) : error LNK2001: unresolved external symbol
__imp____iob_func
1>libpq.lib(win32error.obj) : error LNK2001: unresolved external
symbol __imp____iob_func
1>libpq.lib(fe-connect.obj) : error LNK2001: unresolved external
symbol __imp____iob_func
1>libpq.lib(snprintf.obj) : error LNK2001: unresolved external symbol
__imp____iob_func
1>libpq.lib(encnames.obj) : error LNK2001: unresolved external symbol
__imp____iob_func
1>libpq.lib(chklocale.obj) : error LNK2001: unresolved external symbol
__imp____iob_func
1>libpq.lib(fe-exec.obj) : error LNK2019: unresolved external symbol
__imp__sscanf referenced in function _pqSaveParameterStatus
1>libpq.lib(snprintf.obj) : error LNK2019: unresolved external symbol
__imp__sprintf referenced in function _fmtptr
1>..\dbhandler\vc_mswudll\postgres_dll.dll : fatal error LNK1120: 3
unresolved externals
1> 2 Warning(s)
1> 9 Error(s)

What am I missing?

Thank you

Browse pgsql-general by date

  From Date Subject
Next Message Bertrand Mamasam 2024-11-28 14:35:08 ERROR wrong varnullingrels (b 3) (expected (b)) with LEFT JOIN LATERAL and CTE
Previous Message Rob Sargent 2024-11-28 01:13:00 Re: uninstalling postgresql 13 on ubuntu 22.04?