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?
 
Here are the errors from my attempt to compile.
In file included from from AdsiAuth.cpp:3:
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winefs.h:176:
error: `WINADVAPI' does not name a type
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winefs.h:185:
error: `WINADVAPI' does not name a type
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winefs.h:194:
error: `WINADVAPI' does not name a type
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winefs.h:202:
error: `WINADVAPI' does not name a type
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winefs.h:210:
error: `WINADVAPI' does not name a type
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winefs.h:219:
error: expected constructor, destructor, or type conversion before "void"
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winefs.h:219:
error: expected `,' or `;' before "void"
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winefs.h:225:
error: `WINADVAPI' does not name a type
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winefs.h:234:
error: `WINADVAPI' does not name a type
In file included from c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../..
/include/windows.h:198,
from AdsiAuth.cpp:3:
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winscard.h:32
:22: winsmcrd.h: No such file or directory
In file included from c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../..
/include/windows.h:198,
from AdsiAuth.cpp:3:
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winscard.h:62
: error: `SCARD_IO_REQUEST' does not name a type
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winscard.h:17
8: error: `LPCGUID' has not been declared
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winscard.h:18
6: error: `LPCGUID' has not been declared
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winscard.h:37
1: error: `LPCGUID' has not been declared
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winscard.h:37
2: error: `LPCGUID' has not been declared
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winscard.h:38
1: error: `LPCGUID' has not been declared
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winscard.h:38
2: error: `LPCGUID' has not been declared
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winscard.h:75
4: error: `LPCSCARD_IO_REQUEST' has not been declared
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winscard.h:75
7: error: `LPSCARD_IO_REQUEST' has not been declared
: error: expected `,' or `;' before "static"
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winscard.h:86
6: error: `LPCGUID' does not name a type
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winscard.h:88
2: error: `LPCGUID' does not name a type
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winscard.h:99
8: error: `LPCGUID' does not name a type
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winscard.h:10
23: error: `LPCGUID' does not name a type
In file included from c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../..
/include/windows.h:214,
from AdsiAuth.cpp:3:
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stralign.h:92
: error: expected init-declarator before "static"
c:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stralign.h:92
: error: expected `,' or `;' before "static"
 
 


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