Tech Support > Microsoft Windows > Development Resources > Compiler complains about winbase.h
Compiler complains about winbase.h
Posted by Ashfaque Ahmed on July 7th, 2003


Hi there,

I am trying to build the applications, which were getting built fine
with VC 5.0, with VC 6.0. However, I get the following error messages:

E:\VC98\include\winbase.h(1876) : error C2146: syntax error :
missing ')' before identifier 'latency'
E:\VC98\include\winbase.h(1876) : error C2061: syntax error :
identifier 'latency'
E:\VC98\include\winbase.h(1876) : error C2059: syntax error : ';'
E:\VC98\include\winbase.h(1877) : error C2059: syntax error : ')'
E:\VC98\include\winbase.h(1955) : error C2143: syntax error :
missing '{' before '__stdcall'
E:\VC98\include\winbase.h(1957) : error C2146: syntax error :
missing ')' before identifier 'esFlags'
E:\VC98\include\winbase.h(1957) : error C2061: syntax error :
identifier 'esFlags'
E:\VC98\include\winbase.h(1957) : error C2059: syntax error : ';'
E:\VC98\include\winbase.h(1958) : error C2059: syntax error : ')'
E:\VC98\include\winbase.h(3158) : error C2143: syntax error :
missing '{' before '__stdcall'
E:\VC98\include\winbase.h(3162) : error C2146: syntax error :
missing ')' before identifier 'ulOffset'
E:\VC98\include\winbase.h(3162) : error C2081: 'DWORDLONG' : name
in formal parameter list illegal
E:\VC98\include\winbase.h(3162) : error C2061: syntax error :
identifier 'ulOffset'
E:\VC98\include\winbase.h(3162) : error C2059: syntax error : ';'
E:\VC98\include\winbase.h(3162) : error C2059: syntax error : ','
E:\VC98\include\winbase.h(3165) : error C2059: syntax error : ')'
E:\VC98\include\winbase.h(3186) : error C2146: syntax error :
missing ')' before identifier 'lpBaseAddress'
E:\VC98\include\winbase.h(3186) : error C2061: syntax error :
identifier 'lpBaseAddress'
E:\VC98\include\winbase.h(3186) : error C2059: syntax error : ';'
E:\VC98\include\winbase.h(3187) : error C2059: syntax error : ')'
E:\VC98\include\winbase.h(3740) : error C2146: syntax error :
missing ')' before identifier 'aSegmentArray'
E:\VC98\include\winbase.h(3740) : error C2081:
'FILE_SEGMENT_ELEMENT' : name in formal parameter list illegal
E:\VC98\include\winbase.h(3740) : error C2061: syntax error :
identifier 'aSegmentArray'
E:\VC98\include\winbase.h(3740) : error C2059: syntax error : ';'
E:\VC98\include\winbase.h(3740) : error C2059: syntax error : '['
E:\VC98\include\winbase.h(3744) : error C2059: syntax error : ')'
E:\VC98\include\winbase.h(3751) : error C2146: syntax error :
missing ')' before identifier 'aSegmentArray'
E:\VC98\include\winbase.h(3751) : error C2081:
'FILE_SEGMENT_ELEMENT' : name in formal parameter list illegal
E:\VC98\include\winbase.h(3751) : error C2061: syntax error :
identifier 'aSegmentArray'
E:\VC98\include\winbase.h(3751) : error C2059: syntax error : ';'
E:\VC98\include\winbase.h(3751) : error C2059: syntax error : '['
E:\VC98\include\winbase.h(3755) : error C2059: syntax error : ')'


Please note the following about the Development Environment:
(1) Operating System - Windows NT + SP 6a
(2) VC Installation - VC++ 6.0 + SP5
(3) windows.h is included & not winbase.h(unmodified VC 6.0 file).

I had also defined "#define STRICT" & "#define WIN32_LEAN_AND_MEAN".
These did not cause any change in the error messages however.

Please help!

Thanks in advance,
-Ashfaque =

Posted by Sten Westerback on July 8th, 2003


Look at (end of) whatever .h you have included before
#include <windows.h> .. you probably have some
"loose end" there... unless you really has modified
winbase.h. Or perhaps you include winbase.h separately?

- Sten

"Ashfaque Ahmed" <euqafhsa@lycos.com> wrote in message
news:bd4bff7d.0307070038.132c0977@posting.google.c om...


Posted by Sten Westerback on July 11th, 2003


Generally... without a very good reason not to...
#"include <windows.h> should ALWAYS be
the very first include. Try it and... be surprised.

-Sten

"Ashfaque Ahmed" <euqafhsa@lycos.com> wrote in message
news:bd4bff7d.0307110121.13dfba2d@posting.google.c om...