Link error on Release mode - Mailing list pgsql-general

From Igor Korot
Subject Link error on Release mode
Date
Msg-id CA+FnnTy_SCFqLxbV61pijyjiUaV7rkQ=BKhbT3DcowuW6L4ryw@mail.gmail.com
Whole thread Raw
List 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



pgsql-general by date:

Previous
From: Rob Sargent
Date:
Subject: Re: uninstalling postgresql 13 on ubuntu 22.04?
Next
From: Bertrand Mamasam
Date:
Subject: ERROR wrong varnullingrels (b 3) (expected (b)) with LEFT JOIN LATERAL and CTE