openh264 icon indicating copy to clipboard operation
openh264 copied to clipboard

warnings on Windows

Open vtorri opened this issue 6 years ago • 3 comments

hello

compiling on Windows with MSYS2 and mingw-w64, i have printf warnings :

on Windows, the printf format %lld (or any %ll*) does not exist. I must be replaced with %I64d (replace d with whatever is used with %ll)

vtorri avatar May 13 '19 04:05 vtorri

Openh264 supports MSYS for compiling. btw: %lld should be supported after vs2005? Not sure why it cannot be recognized in MSYS2 and mingw-w64.

huili2 avatar Jun 17 '19 08:06 huili2

well, when using mingw-w64, the libc which is used is msvcrt.dll, which is available since Windows XP. The is no support for %lld format in msvcrt.dll. And note that this DLL can be used in (L)GPL or BSD-like licensed projects

But there are other libc installed by each Visual Studio installers or other installers (msvcr**.dll) and which add other features, but they can't be used in FOSS (and those DLL could also be unavailable)

another solution (the simplest) : adding -D__USE_MINGW_ANSI_STDIO replaces printf family functions with POSIX ones, then %lld will be supported. Also note that in that case, these printf family functions are slow. If your library relies a lot on these functions, you should think twice before using this macro.

it's up to you :-)

vtorri avatar Jun 17 '19 08:06 vtorri

any news on that ?

vtorri avatar May 22 '20 07:05 vtorri