Problem with header files. 
Author Message
 Problem with header files.

 Hello,

   I'm using Visual C++ 6.0 Professional Edition SP3 and I have problems
when I compile a program that compiled with no problems using Visual C++ 5.0
. The problem is that I get errors in the header files of the Visual C++,
for example in the process.h file. I didn't get this kind of errors (in
fact, I had none) in the 5.0 version.
    I would appreciate any help.

  Regards,

 Juan



Tue, 29 Apr 2003 03:00:00 GMT  
 Problem with header files.
You need to provide a bit more information.
What errors are you getting?

Nick

--
Nick Kotarski



Quote:

>  Hello,

>    I'm using Visual C++ 6.0 Professional Edition SP3 and I have problems
> when I compile a program that compiled with no problems using Visual C++
5.0
> . The problem is that I get errors in the header files of the Visual C++,
> for example in the process.h file. I didn't get this kind of errors (in
> fact, I had none) in the 5.0 version.
>     I would appreciate any help.

>   Regards,

>  Juan



Tue, 29 Apr 2003 03:00:00 GMT  
 Problem with header files.

Here you are the errors I get....., for me they make no sense.

:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stddef.h(77) : error
C2054: expected '(' to follow 'f'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stddef.h(77) : error
C2085: '_errno' : not in formal parameter list
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stddef.h(87) : error
C2085: 'ptrdiff_t' : not in formal parameter list
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stddef.h(93) : error
C2085: 'size_t' : not in formal parameter list
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stddef.h(99) : error
C2085: 'wchar_t' : not in formal parameter list
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stddef.h(105) : error
C2085: '__threadid' : not in formal parameter list
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stddef.h(107) : error
C2085: '__threadhandle' : not in formal parameter list
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\excpt.h(32) : warning
C4086: expected pragma parameter to be '1', '2', '4', '8', or '16'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\excpt.h(77) : error
C2085: 'EXCEPTION_DISPOSITION' : not in formal parameter list
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\excpt.h(92) : error
C2061: syntax error : identifier 'EXCEPTION_DISPOSITION'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ctype.h(66) : error
C2061: syntax error : identifier 'wint_t'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ctype.h(66) : error
C2059: syntax error : ';'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ctype.h(67) : error
C2061: syntax error : identifier 'wctype_t'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ctype.h(67) : error
C2059: syntax error : ';'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ctype.h(81) : error
C2143: syntax error : missing '{' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ctype.h(151) : error
C2143: syntax error : missing '{' before '__cdecl'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ctype.h(152) : error
C2143: syntax error : missing '{' before '__cdecl'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(144) : error
C2061: syntax error : identifier 'WCHAR'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(144) : error
C2059: syntax error : ';'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(150) : error
C2143: syntax error : missing '{' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(151) : error
C2143: syntax error : missing '{' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(152) : error
C2143: syntax error : missing '{' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(153) : error
C2143: syntax error : missing '{' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(154) : error
C2143: syntax error : missing '{' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(156) : error
C2143: syntax error : missing '{' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4734) : error
C2061: syntax error : identifier 'WCHAR'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4735) : error
C2059: syntax error : '}'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4767) : error
C2061: syntax error : identifier 'WCHAR'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4768) : error
C2059: syntax error : '}'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4774) : error
C2061: syntax error : identifier 'WCHAR'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4775) : error
C2059: syntax error : '}'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4779) : error
C2059: syntax error : '}'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4780) : error
C2059: syntax error : '}'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(6160) : error
C2061: syntax error : identifier 'WCHAR'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(6161) : error
C2059: syntax error : '}'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(101) : error
C2081: 'size_t' : name in formal parameter list illegal
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(102) : error
C2081: 'size_t' : name in formal parameter list illegal
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(103) : error
C2081: 'size_t' : name in formal parameter list illegal
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(108) : error
C2143: syntax error : missing '{' before '__cdecl'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(111) : error
C2081: 'size_t' : name in formal parameter list illegal
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(118) : error
C2081: 'size_t' : name in formal parameter list illegal
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(127) : error
C2081: 'size_t' : name in formal parameter list illegal
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(128) : error
C2081: 'size_t' : name in formal parameter list illegal
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(129) : error
C2143: syntax error : missing '{' before '__cdecl'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(134) : error
C2081: 'size_t' : name in formal parameter list illegal
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(135) : error
C2081: 'size_t' : name in formal parameter list illegal
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(136) : error
C2081: 'size_t' : name in formal parameter list illegal
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(137) : error
C2081: 'size_t' : name in formal parameter list illegal
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(138) : error
C2081: 'size_t' : name in formal parameter list illegal
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(142) : error
C2143: syntax error : missing '{' before '__cdecl'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(146) : error
C2143: syntax error : missing '{' before '__cdecl'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(146) : error
C2081: 'size_t' : name in formal parameter list illegal
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(167) : error
C2081: 'size_t' : name in formal parameter list illegal
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(168) : error
C2081: 'size_t' : name in formal parameter list illegal
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(181) : error
C2143: syntax error : missing '{' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(181) : error
C2143: syntax error : missing ')' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(181) : error
C2143: syntax error : missing '{' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(181) : error
C2059: syntax error : ','
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(181) : error
C2059: syntax error : ')'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(182) : error
C2143: syntax error : missing '{' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(182) : error
C2143: syntax error : missing ')' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(182) : error
C2143: syntax error : missing '{' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(182) : error
C2059: syntax error : ','
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(182) : error
C2059: syntax error : ')'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(183) : error
C2143: syntax error : missing ')' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(183) : error
C2143: syntax error : missing '{' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(183) : error
C2059: syntax error : ','
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(183) : error
C2059: syntax error : ')'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(184) : error
C2143: syntax error : missing '{' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(184) : error
C2143: syntax error : missing ')' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(184) : error
C2143: syntax error : missing '{' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(184) : error
C2059: syntax error : ','
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(184) : error
C2059: syntax error : ')'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(185) : error
C2143: syntax error : missing '{' before '__cdecl'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(185) : error
C2143: syntax error : missing ')' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(185) : error
C2143: syntax error : missing '{' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(185) : error
C2059: syntax error : ','
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(185) : error
C2059: syntax error : ')'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(186) : error
C2143: syntax error : missing '{' before '__cdecl'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(186) : error
C2143: syntax error : missing ')' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(186) : error
C2143: syntax error : missing '{' before '*'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(186) : error
C2059: syntax error : ')'
E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(186) : error
C2059: syntax error : ';'
E:\Program Files\Microsoft Visual ...

read more »



Tue, 29 Apr 2003 03:00:00 GMT  
 Problem with header files.
I think that your preprocessing may be getting confused.

If you add /P to the compiler options it will write the preprocessed output
to a file.

MSDN says:
This option writes preprocessor output to a file with the same base name as
the source file, but with the .I extension. It adds #line directives to the
output file at the beginning and end of each included file and around lines
removed by preprocessor directives that specify conditional compilation. The
preprocessed listing file is identical to the original source file, except
that all preprocessor directives are carried out, and macro expansions are
performed.

This option suppresses compilation; CL does not produce an .OBJ file, even
if the /Fo option is specified. The /P option also suppresses production of
the alternate output files created by the /FA, /Fa, or /Fm option.

Also add /C to preserve comments in the preprocessed output.

It may be worth enabling the sign-on banner and informational messages
generated during compilation.
To do this remove the /nologo compiler option.
To find this option in the development environment, click Settings on the
Project menu. Then click the C/C++ tab, and click Customize in the Category
box

If you then look at the .i file you may be able to see what is going wrong.
Look at the preprocessed output for stddef.h first.
The compiler messages may well help as well.

Nick

--
Nick Kotarski



Quote:

> Here you are the errors I get....., for me they make no sense.

> :\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stddef.h(77) : error
> C2054: expected '(' to follow 'f'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stddef.h(77) : error
> C2085: '_errno' : not in formal parameter list
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stddef.h(87) : error
> C2085: 'ptrdiff_t' : not in formal parameter list
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stddef.h(93) : error
> C2085: 'size_t' : not in formal parameter list
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stddef.h(99) : error
> C2085: 'wchar_t' : not in formal parameter list
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stddef.h(105) :
error
> C2085: '__threadid' : not in formal parameter list
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stddef.h(107) :
error
> C2085: '__threadhandle' : not in formal parameter list
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\excpt.h(32) :
warning
> C4086: expected pragma parameter to be '1', '2', '4', '8', or '16'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\excpt.h(77) : error
> C2085: 'EXCEPTION_DISPOSITION' : not in formal parameter list
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\excpt.h(92) : error
> C2061: syntax error : identifier 'EXCEPTION_DISPOSITION'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ctype.h(66) : error
> C2061: syntax error : identifier 'wint_t'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ctype.h(66) : error
> C2059: syntax error : ';'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ctype.h(67) : error
> C2061: syntax error : identifier 'wctype_t'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ctype.h(67) : error
> C2059: syntax error : ';'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ctype.h(81) : error
> C2143: syntax error : missing '{' before '*'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ctype.h(151) : error
> C2143: syntax error : missing '{' before '__cdecl'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ctype.h(152) : error
> C2143: syntax error : missing '{' before '__cdecl'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(144) : error
> C2061: syntax error : identifier 'WCHAR'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(144) : error
> C2059: syntax error : ';'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(150) : error
> C2143: syntax error : missing '{' before '*'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(151) : error
> C2143: syntax error : missing '{' before '*'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(152) : error
> C2143: syntax error : missing '{' before '*'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(153) : error
> C2143: syntax error : missing '{' before '*'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(154) : error
> C2143: syntax error : missing '{' before '*'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(156) : error
> C2143: syntax error : missing '{' before '*'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4734) :
error
> C2061: syntax error : identifier 'WCHAR'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4735) :
error
> C2059: syntax error : '}'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4767) :
error
> C2061: syntax error : identifier 'WCHAR'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4768) :
error
> C2059: syntax error : '}'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4774) :
error
> C2061: syntax error : identifier 'WCHAR'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4775) :
error
> C2059: syntax error : '}'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4779) :
error
> C2059: syntax error : '}'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4780) :
error
> C2059: syntax error : '}'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(6160) :
error
> C2061: syntax error : identifier 'WCHAR'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(6161) :
error
> C2059: syntax error : '}'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(101) :
error
> C2081: 'size_t' : name in formal parameter list illegal
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(102) :
error
> C2081: 'size_t' : name in formal parameter list illegal
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(103) :
error
> C2081: 'size_t' : name in formal parameter list illegal
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(108) :
error
> C2143: syntax error : missing '{' before '__cdecl'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(111) :
error
> C2081: 'size_t' : name in formal parameter list illegal
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(118) :
error
> C2081: 'size_t' : name in formal parameter list illegal
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(127) :
error
> C2081: 'size_t' : name in formal parameter list illegal
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(128) :
error
> C2081: 'size_t' : name in formal parameter list illegal
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(129) :
error
> C2143: syntax error : missing '{' before '__cdecl'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(134) :
error
> C2081: 'size_t' : name in formal parameter list illegal
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(135) :
error
> C2081: 'size_t' : name in formal parameter list illegal
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(136) :
error
> C2081: 'size_t' : name in formal parameter list illegal
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(137) :
error
> C2081: 'size_t' : name in formal parameter list illegal
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(138) :
error
> C2081: 'size_t' : name in formal parameter list illegal
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(142) :
error
> C2143: syntax error : missing '{' before '__cdecl'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(146) :
error
> C2143: syntax error : missing '{' before '__cdecl'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(146) :
error
> C2081: 'size_t' : name in formal parameter list illegal
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(167) :
error
> C2081: 'size_t' : name in formal parameter list illegal
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(168) :
error
> C2081: 'size_t' : name in formal parameter list illegal
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(181) :
error
> C2143: syntax error : missing '{' before '*'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(181) :
error
> C2143: syntax error : missing ')' before '*'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(181) :
error
> C2143: syntax error : missing '{' before '*'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(181) :
error
> C2059: syntax error : ','
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(181) :
error
> C2059: syntax error : ')'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(182) :
error
> C2143: syntax error : missing '{' before '*'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(182) :
error
> C2143: syntax error : missing ')' before '*'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(182) :
error
> C2143: syntax error : missing '{' before '*'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(182) :
error
> C2059: syntax error : ','
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(182) :
error
> C2059: syntax error : ')'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(183) :
error
> C2143: syntax error : missing ')' before '*'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(183) :
error
> C2143: syntax error : missing '{' before '*'
> E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(183) :
error
> C2059: syntax error : ','
> E:\Program Files\Microsoft Visual

...

read more »



Tue, 29 Apr 2003 03:00:00 GMT  
 Problem with header files.
If i am not wrong, there is a preprocessor declaration which tells the
compiler that the code is written in VC5 and hence should compile it that
way. Please take a look at Something like _VC5_ or something similar.


Quote:

>  Hello,

>    I'm using Visual C++ 6.0 Professional Edition SP3 and I have problems
> when I compile a program that compiled with no problems using Visual C++
5.0
> . The problem is that I get errors in the header files of the Visual C++,
> for example in the process.h file. I didn't get this kind of errors (in
> fact, I had none) in the 5.0 version.
>     I would appreciate any help.

>   Regards,

>  Juan



Fri, 02 May 2003 15:31:49 GMT  
 Problem with header files.

Thank you, I've found a very strange thing the file which is giving so much
trouble has some errors that appear after the precompiling. For instance,
you can see at the beginning of the file an "f" alone in front of a
#define..... Now I must guess why is this thing happening.

Juan


Quote:
> I think that your preprocessing may be getting confused.

> If you add /P to the compiler options it will write the preprocessed
output
> to a file.

> MSDN says:
> This option writes preprocessor output to a file with the same base name
as
> the source file, but with the .I extension. It adds #line directives to
the
> output file at the beginning and end of each included file and around
lines
> removed by preprocessor directives that specify conditional compilation.
The
> preprocessed listing file is identical to the original source file, except
> that all preprocessor directives are carried out, and macro expansions are
> performed.

> This option suppresses compilation; CL does not produce an .OBJ file, even
> if the /Fo option is specified. The /P option also suppresses production
of
> the alternate output files created by the /FA, /Fa, or /Fm option.

> Also add /C to preserve comments in the preprocessed output.

> It may be worth enabling the sign-on banner and informational messages
> generated during compilation.
> To do this remove the /nologo compiler option.
> To find this option in the development environment, click Settings on the
> Project menu. Then click the C/C++ tab, and click Customize in the
Category
> box

> If you then look at the .i file you may be able to see what is going
wrong.
> Look at the preprocessed output for stddef.h first.
> The compiler messages may well help as well.

> Nick

> --
> Nick Kotarski



> > Here you are the errors I get....., for me they make no sense.

> > :\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stddef.h(77) :
error
> > C2054: expected '(' to follow 'f'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stddef.h(77) :
error
> > C2085: '_errno' : not in formal parameter list
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stddef.h(87) :
error
> > C2085: 'ptrdiff_t' : not in formal parameter list
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stddef.h(93) :
error
> > C2085: 'size_t' : not in formal parameter list
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stddef.h(99) :
error
> > C2085: 'wchar_t' : not in formal parameter list
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stddef.h(105) :
> error
> > C2085: '__threadid' : not in formal parameter list
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\stddef.h(107) :
> error
> > C2085: '__threadhandle' : not in formal parameter list
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\excpt.h(32) :
> warning
> > C4086: expected pragma parameter to be '1', '2', '4', '8', or '16'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\excpt.h(77) :
error
> > C2085: 'EXCEPTION_DISPOSITION' : not in formal parameter list
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\excpt.h(92) :
error
> > C2061: syntax error : identifier 'EXCEPTION_DISPOSITION'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ctype.h(66) :
error
> > C2061: syntax error : identifier 'wint_t'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ctype.h(66) :
error
> > C2059: syntax error : ';'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ctype.h(67) :
error
> > C2061: syntax error : identifier 'wctype_t'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ctype.h(67) :
error
> > C2059: syntax error : ';'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ctype.h(81) :
error
> > C2143: syntax error : missing '{' before '*'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ctype.h(151) :
error
> > C2143: syntax error : missing '{' before '__cdecl'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ctype.h(152) :
error
> > C2143: syntax error : missing '{' before '__cdecl'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(144) :
error
> > C2061: syntax error : identifier 'WCHAR'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(144) :
error
> > C2059: syntax error : ';'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(150) :
error
> > C2143: syntax error : missing '{' before '*'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(151) :
error
> > C2143: syntax error : missing '{' before '*'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(152) :
error
> > C2143: syntax error : missing '{' before '*'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(153) :
error
> > C2143: syntax error : missing '{' before '*'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(154) :
error
> > C2143: syntax error : missing '{' before '*'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(156) :
error
> > C2143: syntax error : missing '{' before '*'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4734) :
> error
> > C2061: syntax error : identifier 'WCHAR'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4735) :
> error
> > C2059: syntax error : '}'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4767) :
> error
> > C2061: syntax error : identifier 'WCHAR'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4768) :
> error
> > C2059: syntax error : '}'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4774) :
> error
> > C2061: syntax error : identifier 'WCHAR'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4775) :
> error
> > C2059: syntax error : '}'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4779) :
> error
> > C2059: syntax error : '}'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(4780) :
> error
> > C2059: syntax error : '}'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(6160) :
> error
> > C2061: syntax error : identifier 'WCHAR'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(6161) :
> error
> > C2059: syntax error : '}'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(101) :
> error
> > C2081: 'size_t' : name in formal parameter list illegal
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(102) :
> error
> > C2081: 'size_t' : name in formal parameter list illegal
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(103) :
> error
> > C2081: 'size_t' : name in formal parameter list illegal
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(108) :
> error
> > C2143: syntax error : missing '{' before '__cdecl'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(111) :
> error
> > C2081: 'size_t' : name in formal parameter list illegal
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(118) :
> error
> > C2081: 'size_t' : name in formal parameter list illegal
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(127) :
> error
> > C2081: 'size_t' : name in formal parameter list illegal
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(128) :
> error
> > C2081: 'size_t' : name in formal parameter list illegal
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(129) :
> error
> > C2143: syntax error : missing '{' before '__cdecl'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(134) :
> error
> > C2081: 'size_t' : name in formal parameter list illegal
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(135) :
> error
> > C2081: 'size_t' : name in formal parameter list illegal
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(136) :
> error
> > C2081: 'size_t' : name in formal parameter list illegal
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(137) :
> error
> > C2081: 'size_t' : name in formal parameter list illegal
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(138) :
> error
> > C2081: 'size_t' : name in formal parameter list illegal
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(142) :
> error
> > C2143: syntax error : missing '{' before '__cdecl'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(146) :
> error
> > C2143: syntax error : missing '{' before '__cdecl'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(146) :
> error
> > C2081: 'size_t' : name in formal parameter list illegal
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(167) :
> error
> > C2081: 'size_t' : name in formal parameter list illegal
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(168) :
> error
> > C2081: 'size_t' : name in formal parameter list illegal
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(181) :
> error
> > C2143: syntax error : missing '{' before '*'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(181) :
> error
> > C2143: syntax error : missing ')' before '*'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(181) :
> error
> > C2143: syntax error : missing '{' before '*'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(181) :
> error
> > C2059: syntax error : ','
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(181) :
> error
> > C2059: syntax error : ')'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(182) :
> error
> > C2143: syntax error : missing '{' before '*'
> > E:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\string.h(182) :
> error
> > C2143: syntax

...

read more »



Fri, 02 May 2003 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Problem with header files

2. Problems with header file, etc.

3. a problem with header files

4. Simple compile problem with header file

5. problem with header file (.h)

6. Problem: Using header files

7. problem getting header file for the COM dll that uses msado15.dll

8. Problem compiling header files

9. BOOL problem with header file

10. Problem with header files

11. Help! Having problems combining header files, malloc, and **pointers

12. #ifndef/#ifdef problems in my header file (conditional header inclusion)

 

 
Powered by phpBB® Forum Software