Re: Compilation errors in Standard header files



Sriram <Sriram@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
>I was trying to build the .exe for our project and its giving me compilation
>errors in standard header files supplied by VC++ like stdlib.h, objbase.h etc.
>When I write a simple C file, its not giving these compilation erros. My
>question is if its a real problem in header files, it should give the same
>erros for every aplication I build.So I doubt if I am missing any
>compiler/linker options.
>
>I am copying the errors occuring here:
>
>c:\program files\microsoft visual studio\vc98\include\stdlib.h(249) : error
>C2226: syntax error : unexpected type 'T'
>c:\program files\microsoft visual studio\vc98\include\stdlib.h(249) : error
>C2062: type 'const int' unexpected
>c:\program files\microsoft visual studio\vc98\include\stdlib.h(249) : error
>C2059: syntax error : ')'
>c:\program files\microsoft visual studio\vc98\include\stdlib.h(257) : error
>C2062: type 'const int' unexpected
>c:\program files\microsoft visual studio\vc98\include\stdlib.h(257) : error
>C2059: syntax error : ')'
>c:\program files\microsoft visual studio\vc98\include\stdlib.h(258) : error
>C2143: syntax error : missing ';' before '{'
>c:\program files\microsoft visual studio\vc98\include\stdlib.h(258) : error
>C2447: missing function header (old-style formal list?)
>
>Please let me know the solution for this as soon as possible.
>copy your reply to sriram.bhetanabottla@xxxxxxxxxxxxx

This does not make sense. In my vc98\include, lines 249 and 257 are
comments. Further, the string "const int" does not occur anywhere in the
file. I would guess that you have overwritten your copy of stdlib.h with
some other file.
--
- Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.
.



Relevant Pages

  • Re: Duplicate Header Declaration
    ... syntax error before '{' token ... continued compilation (finally rejecting the translation unit because ... If your compiler reports a syntax error, ... identifier, a misspelled identifier, or a type mismatch usually aren't ...
    (comp.lang.c)
  • Re: New versions of VC++ still stuck with function prototypes?
    ... could drastically improve compilation speed. ... better separation than the other languages. ... interface section and one implementation section. ... precompiled header files to speed up compilation. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Negative lookahead regex clarification needed
    ... Every regex engine in existence ... Processing on-the-fly and compilation don't exclude one another. ... > within the text, you don't have a correct statement. ... If the regex engine cannot translate your string, it's a syntax error. ...
    (comp.lang.perl.misc)
  • Re: metapost or something? Coordinate system - transformation with cosine...
    ... hmm. ... @q ** Compilation. ... That's CWEB, but you don't really need it. ... GCC looks through the path for header files specified on your system, ...
    (comp.text.tex)
  • Re: New versions of VC++ still stuck with function prototypes?
    ... compilation time is a clean separation of interface from implementation. ... This separation can be accomplished through properly designed header files, ... I expect that we'll see a new language with the expressiveness of C++ ... but with a clean module concept before we see such featues in standar C++. ...
    (microsoft.public.dotnet.languages.vc)