On 18.03.2015 3:37, LRN wrote: > In file included from ../../poppler-0.30.0/poppler/GlobalParams.cc:59:0: > F:/e41/mingw/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); > > ... > > if i add #include <basetyps.h> to shlobj.h, i get this: > > ... > > if i add #include <ntdef.h> to shlobj.h, i get this: > > ... > > if i add #include <wincrypt.h> to shlobj.h, i get tons of errors. > if i add #include <windef.h> before that, i get an error about undefined > PSYSTEMTIME > if i add #include <wtypesbase.h> between wincrypt and windef, FINALLY > everything compiles. > > > Note that shlobj.h is a not a part of the Windows header tree and is not > included by any usual Windows headers (windows.h et all), so i'd say that it > should be self-sufficient and should not rely on the user to already have all > necessary includes in place (well, it would be nice to have header files with > no includes, but that's not realistic with CRT or W32 API). > >
After discussing it on the IRC and tinkering with the header, i came up with this attached patch. -- O< ascii ribbon - stop html email! - www.asciiribbon.org
From 05cd15be68cc0f60feca6bc949cc908135f2606a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <[email protected]> Date: Wed, 18 Mar 2015 14:06:33 +0000 Subject: [PATCH] Add more includes to shlobj.h wtypesbase.h and wincrypt.h pull some other headers, together they all provide EXTERN_C, DECLSPEC_IMPORT and WINAPI macros, which are needed by shlobj.h directly or indirectly. --- mingw-w64-headers/include/shlobj.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mingw-w64-headers/include/shlobj.h b/mingw-w64-headers/include/shlobj.h index 3d2e21c..be087c4 100644 --- a/mingw-w64-headers/include/shlobj.h +++ b/mingw-w64-headers/include/shlobj.h @@ -6,6 +6,8 @@ #ifndef _SHLOBJ_H_ #define _SHLOBJ_H_ +#include <wtypesbase.h> +#include <wincrypt.h> #include <winapifamily.h> #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) || defined(WINSTORECOMPAT) -- 1.8.5.3
0x922360B0.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
