Hi, Hib Since your helpful email I have been driven back from my attempt to link the pdf backend statically into the evince widget - the poppler code depends on too many libraries for me to get to the bottom of.
Before I give up altogether I thought I should try the .dll route again. >From a different build of evince I have a libpdfdocument.dll built and I tried placing it in the location that evince reported it was searching for it. But I got the following pair of error messages: (denemo.exe:2248): EvinceDocument-WARNING **: `D:\lib\evince\3\backends\libpdfdocument.dll': The specified module could not be found. (denemo.exe:2248): EvinceDocument-WARNING **: Cannot load backend 'pdfdocument' since file 'D:\lib\evince\3\backends\lib pdfdocument.dll' cannot be read. The file exists at the location specified, and as I understand it there are no permissions on a windows file system that would prevent the file being read. I wonder if you or anyone else knows what is going on here, and if there is out there some build of the evince library with pdf backend support that we can use/follow. Any help will be much appreciated as I think I reached the end of my tether some while ago! Richard Shann On Sun, 2013-02-17 at 09:04 +0000, Richard Shann wrote: > On Sat, 2013-02-16 at 18:53 +0100, Hib Eris wrote: > > Hi Richard, > > > > When I build the 'official' Evince for Windows I always build it with > > shared libraries. I have no experience with building it statically. > > > > I think it is like this: libevdocument is evince's library to handle > > documents. You can dynamically add plugins for handeling different > > document formats. So for pdf documents Evince uses a libpdfdocument > > plugin. I think these plugins are always shared libraries. > > When you statically compile libevdocument, it still looks for shared > > library plugins like libpdfdocument.dll. So I think you should not add > > '--disable-shared' to your configure. > Unfortunately this then requires half-a-dozen other libraries to be > available as shared objects. It looks like the only route will be to add > support to evince to directly call the poppler routines when statically > linking. > Thank you for the response. > > Richard Shann > > > > > Regards, > > > > Hib Eris > > > > > > > > > > > > > > On Sat, Feb 16, 2013 at 4:11 PM, Richard Shann <[email protected]> > > wrote: > > > Hi, > > > In the GNU/Denemo project we are trying to cross-compile libevince 2.32. > > > for windows. We are using mxe for this, and have a configure step > > > looking like this > > > ./configure \ > > > --host='$(TARGET)' \ > > > --disable-shared \ > > > --prefix='$(PREFIX)/$(TARGET)' \ > > > --without-libgnome \ > > > --without-gconf \ > > > --without-keyring \ > > > --with-platform=win32 \ > > > --with-smclient-backend=win32 \ > > > --disable-help \ > > > --disable-thumbnailer \ > > > --disable-nautilus \ > > > --disable-dbus \ > > > --disable-gtk-doc \ > > > --disable-previewer \ > > > --disable-nls \ > > > --without-gtk-unix-print \ > > > --disable-comics \ > > > CONFIG_SHELL=$(SHELL) > > > > > > We get a static library for evince but also another static library > > > lib/evince/3/backends/libpdfdocument.a and the .la file. > > > However, when the evince widget tries to load a pdf document it > > > complains that libpdfdocument.dll is not found in the backends > > > directory. > > > > > > Is there something wrong with our configure step? (I should mention we > > > also need two patches to enable the compilation, appended below). > > > > > > Richard Shann > > > > > > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><--- > > > evince-2.32.0/shell/main.c 2010-07-27 11:47:54.000000000 -0400 > > > +++ evince-2.32.0.new/shell/main.c 2013-02-02 23:57:54.000000000 > > > -0500 > > > @@ -43,9 +43,6 @@ > > > #ifdef G_OS_WIN32 > > > #include <io.h> > > > #include <conio.h> > > > -#if !(_WIN32_WINNT >= 0x0500) > > > -#error "_WIN32_WINNT must be defined >= 0x0500" > > > -#endif > > > #include <windows.h> > > > #endif > > > > > > @@ -249,7 +246,7 @@ main (int argc, char *argv[]) > > > AttachConsole_t p_AttachConsole = > > > (AttachConsole_t) GetProcAddress (GetModuleHandle > > > ("kernel32.dll"), "AttachConsole"); > > > > > > - if (p_AttachConsole != NULL && p_AttachConsole > > > (ATTACH_PARENT_PROCESS)) > > > + if (p_AttachConsole != NULL && p_AttachConsole (-1)) > > > { > > > freopen ("CONOUT$", "w", stdout); > > > dup2 (fileno (stdout), 1); > > > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><--- > > > evince-2.32.0/backend/pdf/ev-poppler.cc 2010-09-27 12:54:34.000000000 > > > -0400 > > > +++ evince-2.32.0.new/backend/pdf/ev-poppler.cc 2013-02-02 > > > 23:40:15.000000000 -0500 > > > @@ -1934,9 +1934,7 @@ pdf_selection_get_selected_text (EvSelec > > > r.x2 = points->x2; > > > r.y2 = height - points->y1; > > > > > > - retval = poppler_page_get_text (poppler_page, > > > - (PopplerSelectionStyle)style, > > > - &r); > > > + retval = poppler_page_get_text (poppler_page); > > > #endif /* HAVE_POPPLER_PAGE_GET_SELECTED_TEXT */ > > > > > > return retval; > > > @@ -2054,9 +2052,7 @@ pdf_document_text_get_text (EvDocumentTe > > > r.y1 = 0; > > > poppler_page_get_size (poppler_page, &(r.x2), &(r.y2)); > > > > > > - return poppler_page_get_text (poppler_page, > > > - POPPLER_SELECTION_WORD, > > > - &r); > > > + return poppler_page_get_text (poppler_page); > > > } > > > #endif /* HAVE_POPPLER_PAGE_GET_SELECTED_TEXT */ > > > > > > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8>< > > > > > > > > > _______________________________________________ > > > evince-list mailing list > > > [email protected] > > > https://mail.gnome.org/mailman/listinfo/evince-list > _______________________________________________ evince-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/evince-list
