Thanks Michael.

Michael Gerdau <> wrote:
> 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)


HTH, best,
Vote against SPAM - see
Michael Gerdau email:
GPG-keys available on request or at public keyserver

Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping