> I am trying to compile a c++ program.
> I received a bunch of errors related to the include files.
> I posted to a C++ group and they said the following:
> WINADVAPI is #defined by windows.h to __declspec(dllimport).
> I guess that gcc doesn't support this keyword, so it looks like you
> can't use windows.h with gcc without some special include files to
> fix the incompatibilities.
> Is there a workaround in mingw for this?
MinGW's winbase.h is missing a proper #define for WINADVAPI.
Adding something like the following to the beginning of winbase.h
should get you started until there is a proper patch:
Signed-off by Michael Gerdau
(actually I mostly copied it from winbase.h)
#define WINADVAPI DECLSPEC_IMPORT
Vote against SPAM - see http://www.politik-digital.de/spam/
Michael Gerdau email: firstname.lastname@example.org
GPG-keys available on request or at public keyserver