Bug 91384 - [patch] shlobj.h is missing #defines without including windows.h first
Summary: [patch] shlobj.h is missing #defines without including windows.h first
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other Windows (All)
: medium normal
Assignee: poppler-bugs
QA Contact:
Depends on:
Reported: 2015-07-18 14:52 UTC by Michael Henning
Modified: 2018-08-21 10:40 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Patch to fix including shlobj.h (263 bytes, text/plain)
2015-07-18 14:52 UTC, Michael Henning

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.