Bug 91384

Summary: [patch] shlobj.h is missing #defines without including windows.h first
Product: poppler Reporter: Michael Henning <drawoc>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch to fix including shlobj.h

Description Michael Henning 2015-07-18 14:52:26 UTC
Created attachment 117232 [details]
Patch to fix including shlobj.h

When cross-compiling poppler for windows using mingw, I get the following error:

In file included from GlobalParams.cc:59:0:
/usr/i686-w64-mingw32/include/shlobj.h:37:3: error: 'EXTERN_C' does not name a type
   SHFOLDERAPI SHGetFolderPathW (HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath);
   ^

It seems that simply including windows.h before shlobj.h pulls in the necessary definitions for shlobj.h and fixes this issue. See attached patch.
Comment 1 Michael Henning 2015-07-18 15:01:58 UTC
(This happens with poppler 0.34.0)
Comment 2 Albert Astals Cid 2015-07-18 15:21:48 UTC
Maybe what you want is telling the mingw people to fix their includes?
Comment 3 GitLab Migration User 2018-08-21 10:40:49 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/320.

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.