Yes, this is very strange that iconv-2.dll exports sprintf symbol. I don't even 
see a check for sprintf in output from configure, this could at least explain 
something.

I tried to examine object files with dumpbin.exe to find out which of them 
defines sprintf, but there is no such object file.

In MSVC headers, sprintf and friends can be either simply declared as externals 
or defined as inline functions. It seems to be controlled some internal (not 
documented) macro. I believe it should always be visible as an inline function 
to user code.

- Kirill Makurin
________________________________
From: Bruno Haible <br...@clisp.org>
Sent: Tuesday, June 10, 2025 9:57 AM
To: bug-gnulib@gnu.org <bug-gnulib@gnu.org>; Kirill Makurin 
<maiddais...@outlook.com>
Subject: Re: clang-cl: undeclared library function 'sprintf'

Kirill Makurin wrote:
> This is the only issue I have encountered using clang-cl.exe. Everything else 
> works just fine.
>
> Actually, I tried to rebuild everything from scratch with clang-cl.exe and 
> noticed that iconv-2.dll, when built with clang-cl exports sprintf symbol

There's no reason why GNU libiconv's shared library should export the
'sprintf' symbol. Try looking how sprintf is defined in the MSVC headers,
and then, which .obj file exports it.

Bruno



Reply via email to