Обсуждение: Problem linking with Release library

Поиск
Список
Период
Сортировка

Problem linking with Release library

От
Igor Korot
Дата:
Hi,
A long time ago I built both Debug and Release versions of libpq.

For a while I was working with the Debug version without any issues

Now I tried to build a Release version of my program.

Compilation went fine but during linking I got

[code]
1>libpq.lib(snprintf.obj) : warning LNK4217: locally defined symbol
_sprintf imported in function _fmtptr
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>    33 Warning(s)
1>    8 Error(s)
1>
[/code]

Do I need to rebuild a Release version with some missing parameters?

I'm working with MSVC 2017 for now...

Thank you.



Re: Problem linking with Release library

От
Adrian Klaver
Дата:
On 5/7/26 11:36 PM, Igor Korot wrote:
> Hi,
> A long time ago I built both Debug and Release versions of libpq.

Define what distinguishes Debug from Release  version.

What version of Postgres are you using for the source?

What OS and version are you building on?

.
> 
> Thank you.
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com



Re: Problem linking with Release library

От
Igor Korot
Дата:
Hi, Adrian,

On Fri, May 8, 2026 at 7:32 AM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 5/7/26 11:36 PM, Igor Korot wrote:
> Hi,
> A long time ago I built both Debug and Release versions of libpq.

Define what distinguishes Debug from Release  version.

Debug - on *nix-like systems it compiles with “-g”. On windows it has references to the source code.

Release - it’s stripped from the source code references.



What version of Postgres are you using for the source?

What OS and version are you building on?

This is building on Windows 8 with MSVC 2017.

Thank you.



.
>
> Thank you.
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com

Re: Problem linking with Release library

От
Ron Johnson
Дата:
On Fri, May 8, 2026 at 11:35 AM Igor Korot <ikorot01@gmail.com> wrote:
[snip] 
This is building on Windows 8 
 
Isn't that years EOL?

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!