<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><br><br><div>> To: poppler@lists.freedesktop.org<br>> Date: Sun, 6 Mar 2016 11:22:10 -0800<br>> From: mathog@caltech.edu<br>> Subject: Re: [poppler] Poppler provided printf() functions on Windows not      language compliant<br>> <br>> On 04-Mar-2016 23:39, Adam Reichold wrote:<br>> >> mingw32-g++ -O0 -ggdb  -static-libgcc -static-libstdc++ -o printf_bug<br>> >> printf_bug.c -Lc:\progs\devlibs61/lib -lpoppler<br>> <br>> > This looks like you are linking libgcc statically, but load libpoppler<br>> > dynamically? If so, couldn't it be that global data structures from the<br>> > static library and the dependencies on libgcc in libpoppler collide for<br>> > example if the versions do not match? Have you tried to replace with<br>> > libpoppler with any other dynamic link library from the devlibs<br>> > collection that references printf? Have you tried not to link <br>> > statically with libgcc?<br></div><div><br></div><div><br></div><div>I think that libgcc might be related to the problem. Maybe something in libpoppler uses something in the Windows C library that is not in the libraries that are part of mingw. The poppler configure script searches for a lot of functions, and maybe it discovered a function in a Windows library, and calling that function brings in something in the Windows stdio implementation that conflicts with the version in mingw's libraries.</div><div><br></div><div>Can you add -v to the compile command to show the full link line? g++ adds a number of libraries automatically, and probably mingw adds some additional Windows libraries.</div><div><br></div><div>Once you have the full link line, you can paste it into a script and try removing Windows libraries to see what ends up undefined.</div><div><br></div><div><div>Also, was your poppler dll built with the same mingw version that you have installed on your PC? You might be able to use "strings" or a good editor to search for "GCC" in the poppler dll.</div></div><div><br></div><div>The stack trace that you send a few days ago had lines that started something like poppler.dll!printf.o. Does that mean that parts of libc are embedded in poppler.dll?</div><div><br></div><div>Can you post your poppler.dll? I am not sure if Linux objdump can parse it, but it would be interesting to see if that library has more than just poppler code.</div><div><br></div><div>William</div><div><br></div>                                          </div></body>
</html>