Hi! I am still using poppler in cross-compiling for windows so there are two minor bugs in 0.6. Or maybe it is just a misconfiguration on my laptop. Anyway. There seem to be no localtime_r on my i686-mingw32 toolchain. I suppose a check might be needed and a HAVE_LOCALTIME_R added. In glib/test-poppler-glib.c the function is used into poppler_format_date(GTime), so maybe just some #if/#else would be nice. I replaced the `struct tm t;` with `struct tm *t;` and `!localtime (&time, &t)` with `!(t = localtime (&time))` but i have absolutely no idea of the meaning. Yet another problem while compiling is a `/bin/sh ../libtool --tag=CC --mode=link i686-mingw32-gcc ... -o test-poppler-glib.exe test-poppler-glib.o ...` which gives many unresolved symbols. I replaced it with a `... --tag=CC --mode=link i686-mingw32-g++ ...` to compile. Seems nothing at all and thanks a lot for this useful library :)
Hi! I am compiling the new poppler 0.6.1 using Ubuntu's mingw32 (cross-compiler for windows) and I got exactly the same problems : 1. There is a `i586-mingw32msvc-gcc' command which gives undefined references to standard C++ things, so a `i586-mingw32msvc-g++' is necessary while building `test-poppler-glib.exe'. For instance: poppler-0.6.1/poppler/.libs/libpoppler.a(Function.o):Function.cc:(.text+0x6d3c): undefined reference to `operator new(unsigned int)' 2. Maybe I am missing something but `localtime_r' is still undefined with my Ubuntu mingw32 installation, as with crossdev on Gentoo. So I suggest to add a HAVE_LOCALTIME_R and a line like: if (time == 0 || localtime (&time)) return NULL; in glib/test-poppler-glib.c Thanks a lot! -- Émilien TLAPALE
Created attachment 12194 [details] [review] Small patch Please apply the attached patch and see if renaming test-poppler-glib.c to test-poppler-glib.cc and changing test_poppler_glib_SOURCES = \ test-poppler-glib.c to test_poppler_glib_SOURCES = \ test-poppler-glib.cc in Makefile.am fixes your problems.
This indeed solves the compilation problems. Thanks :)
fixed on git
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.