Bug 11228

Summary: compilation errors when using popler headers in multithreaded applications
Product: poppler Reporter: Axel Howind <Axel.Howind>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: cleanup includes for poppler 0.5.9

Description Axel Howind 2007-06-11 02:50:54 UTC
headers installed using "--enable-xpdf-headers" mix up use of #include "goo/..." and <goo/...>, wich leads to compilation errors in some circumstances (applies to 0.5.4 and 0.5.9 Release Candidate).

Example (from GlobalParams.h):

  #include "goo/gtypes.h"
  #include "CharTypes.h"
  
  #if MULTITHREADED
  #include <goo/GooMutex.h>
  #endif

This works when compiling w/o MULTITHREADED, but does not when it is defined.

Steps to reproduce: use #include <poppler/GlobalParams.h> in any of your sources and compile with MULTITHREADED defined.

Workaround: Use an additional -I /usr/local/include/poppler in your application's makefile (or wherever your headers are installed).
Comment 1 Axel Howind 2007-06-11 02:55:44 UTC
Created attachment 10249 [details] [review]
cleanup includes for poppler 0.5.9

This patch changes all remaining #include <goo/...> to "goo/..." in the poppler headers.
Comment 2 Albert Astals Cid 2007-06-11 14:14:39 UTC
Commited into the cvs. Thanks for the patch.

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.