Errors including <windows.h>

This is a discussion on Errors including <windows.h> within the Windows Programming forums, part of the Platform Specific Boards category; I'm using VC++ 2008, when I include <windows.h> I get errors. How do I get this to compile? Code: #include ...

  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    65

    Errors including <windows.h>

    I'm using VC++ 2008, when I include <windows.h> I get errors. How do I get this to compile?
    Code:
    #include <windows.h>
    
    int main()
    {
    }
    ------ Build started: Project: first, Configuration: Debug Win32 ------
    Compiling...
    main.cpp
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(171) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(172) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(172) : warning C4005: '__' : macro redefinition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(171) : see previous definition of '__'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(173) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(173) : warning C4005: '__' : macro redefinition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(172) : see previous definition of '__'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(174) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(174) : warning C4005: '__' : macro redefinition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(173) : see previous definition of '__'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(175) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(175) : warning C4005: '__' : macro redefinition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(174) : see previous definition of '__'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(176) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(176) : warning C4005: '__' : macro redefinition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(175) : see previous definition of '__'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(177) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(177) : warning C4005: '__' : macro redefinition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(176) : see previous definition of '__'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(178) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(178) : warning C4005: '__' : macro redefinition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(177) : see previous definition of '__'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(6) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(10) : warning C4005: '__' : macro redefinition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings.h(178) : see previous definition of '__'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(14) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(14) : warning C4005: '__' : macro redefinition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(10) : see previous definition of '__'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(16) : error C2018: unknown character '0x24'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(16) : error C2144: syntax error : 'char' should be preceded by ';'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(16) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(16) : error C2144: syntax error : 'char' should be preceded by ';'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(17) : error C2628: 'TCHAR' followed by 'char' is illegal (did you forget a ';'?)
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(17) : error C2018: unknown character '0x24'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(17) : error C2144: syntax error : 'unsigned short' should be preceded by ';'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(17) : error C2378: 'compname_props' : redefinition; symbol cannot be overloaded with a typedef
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(16) : see declaration of 'compname_props'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(18) : error C2628: 'TCHAR' followed by 'char' is illegal (did you forget a ';'?)
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(18) : error C2018: unknown character '0x24'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(18) : error C2143: syntax error : missing ';' before 'const'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(18) : error C2378: 'compname_props' : redefinition; symbol cannot be overloaded with a typedef
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(16) : see declaration of 'compname_props'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(19) : error C2628: 'TCHAR' followed by 'char' is illegal (did you forget a ';'?)
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(19) : error C2018: unknown character '0x24'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(19) : error C2146: syntax error : missing ';' before identifier 'TCHAR'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(19) : error C2378: 'compname_props' : redefinition; symbol cannot be overloaded with a typedef
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(16) : see declaration of 'compname_props'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(19) : error C2628: 'TCHAR' followed by 'char' is illegal (did you forget a ';'?)
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(19) : error C2018: unknown character '0x24'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(19) : error C2143: syntax error : missing ';' before '*'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(19) : error C2377: 'TCHAR' : redefinition; typedef cannot be overloaded with any other symbol
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(16) : see declaration of 'TCHAR'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(19) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(20) : error C2018: unknown character '0x24'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(20) : error C2144: syntax error : 'char' should be preceded by ';'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(20) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(20) : error C2370: 'TCHAR' : redefinition; different storage class
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(19) : see declaration of 'TCHAR'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(20) : error C2143: syntax error : missing ';' before 'const'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(20) : error C2086: 'char compname_props' : redefinition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(16) : see declaration of 'compname_props'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(20) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(20) : error C2018: unknown character '0x24'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(20) : error C2144: syntax error : 'char' should be preceded by ';'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(20) : error C2373: 'TCHAR' : redefinition; different type modifiers
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(19) : see declaration of 'TCHAR'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(20) : error C2143: syntax error : missing ';' before '*'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(20) : error C2371: 'TCHAR' : redefinition; different basic types
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(19) : see declaration of 'TCHAR'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(20) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(21) : warning C4067: unexpected tokens following preprocessor directive - expected a newline
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(22) : warning C4067: unexpected tokens following preprocessor directive - expected a newline
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_undef.h(1) : warning C4067: unexpected tokens following preprocessor directive - expected a newline
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_undef.h(2) : warning C4067: unexpected tokens following preprocessor directive - expected a newline
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_undef.h(3) : warning C4067: unexpected tokens following preprocessor directive - expected a newline
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_undef.h(4) : warning C4067: unexpected tokens following preprocessor directive - expected a newline
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_undef.h(5) : warning C4067: unexpected tokens following preprocessor directive - expected a newline
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_undef.h(6) : warning C4067: unexpected tokens following preprocessor directive - expected a newline
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_undef.h(7) : warning C4067: unexpected tokens following preprocessor directive - expected a newline
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_undef.h(8) : warning C4067: unexpected tokens following preprocessor directive - expected a newline
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 11) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 12) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 14) : warning C4005: '__' : macro redefinition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 11) : see previous definition of '__'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 15) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 15) : warning C4005: '__' : macro redefinition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 14) : see previous definition of '__'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 21) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 21) : warning C4005: '__' : macro redefinition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 15) : see previous definition of '__'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 23) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 23) : warning C4005: '__' : macro redefinition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 21) : see previous definition of '__'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 24) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 24) : warning C4005: '__' : macro redefinition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 23) : see previous definition of '__'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 25) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 25) : warning C4005: '__' : macro redefinition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 24) : see previous definition of '__'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 26) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 26) : warning C4005: '__' : macro redefinition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 25) : see previous definition of '__'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 27) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 27) : warning C4005: '__' : macro redefinition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 26) : see previous definition of '__'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 28) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 28) : warning C4005: '__' : macro redefinition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 27) : see previous definition of '__'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 29) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 29) : warning C4005: '__' : macro redefinition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 28) : see previous definition of '__'
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 30) : error C2008: '$' : unexpected in macro definition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 30) : warning C4005: '__' : macro redefinition
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_strict.h(10 29) : see previous definition of '__'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(297) : error C2018: unknown character '0x24'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(297) : error C2146: syntax error : missing ';' before identifier 'allowed_on_typedecl'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(297) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(297) : error C2146: syntax error : missing ';' before identifier 'WCHAR'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(297) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(298) : error C2018: unknown character '0x24'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(298) : error C2146: syntax error : missing ';' before identifier 'PWSTR'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(298) : error C2378: 'allowed_on_typedecl' : redefinition; symbol cannot be overloaded with a typedef
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(297) : see declaration of 'allowed_on_typedecl'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(298) : error C2143: syntax error : missing ';' before '*'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(298) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(298) : error C2040: 'PWSTR' : 'int' differs in levels of indirection from 'WCHAR *'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(298) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(299) : error C2018: unknown character '0x24'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(299) : error C2143: syntax error : missing ';' before 'const'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(299) : error C2378: 'allowed_on_typedecl' : redefinition; symbol cannot be overloaded with a typedef
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(297) : see declaration of 'allowed_on_typedecl'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(299) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(299) : error C2143: syntax error : missing ';' before '*'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(299) : error C2373: 'PWSTR' : redefinition; different type modifiers
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(297) : see declaration of 'PWSTR'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(299) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(300) : error C2018: unknown character '0x24'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(300) : error C2146: syntax error : missing ';' before identifier 'WCHAR'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(300) : error C2378: 'allowed_on_typedecl' : redefinition; symbol cannot be overloaded with a typedef
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(297) : see declaration of 'allowed_on_typedecl'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(301) : error C2018: unknown character '0x24'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(301) : error C2143: syntax error : missing ';' before 'const'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(301) : error C2378: 'allowed_on_typedecl' : redefinition; symbol cannot be overloaded with a typedef
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(297) : see declaration of 'allowed_on_typedecl'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(302) : error C2018: unknown character '0x24'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(302) : error C2146: syntax error : missing ';' before identifier 'PCWSTR'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(302) : error C2378: 'allowed_on_typedecl' : redefinition; symbol cannot be overloaded with a typedef
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(297) : see declaration of 'allowed_on_typedecl'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(302) : error C2143: syntax error : missing ';' before '*'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(302) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(302) : error C2040: 'PCWSTR' : 'int' differs in levels of indirection from 'const WCHAR *'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(302) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(303) : error C2018: unknown character '0x24'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(303) : error C2143: syntax error : missing ';' before 'const'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(303) : error C2378: 'allowed_on_typedecl' : redefinition; symbol cannot be overloaded with a typedef
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(297) : see declaration of 'allowed_on_typedecl'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(356) : error C2018: unknown character '0x24'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(356) : error C2146: syntax error : missing ';' before identifier 'CHAR'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(356) : error C2378: 'allowed_on_typedecl' : redefinition; symbol cannot be overloaded with a typedef
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(297) : see declaration of 'allowed_on_typedecl'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(357) : error C2018: unknown character '0x24'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(357) : error C2146: syntax error : missing ';' before identifier 'PSTR'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(357) : error C2378: 'allowed_on_typedecl' : redefinition; symbol cannot be overloaded with a typedef
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(297) : see declaration of 'allowed_on_typedecl'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(357) : error C2143: syntax error : missing ';' before '*'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(357) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(357) : error C2040: 'PSTR' : 'int' differs in levels of indirection from 'CHAR *'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(357) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(358) : error C2018: unknown character '0x24'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(358) : error C2143: syntax error : missing ';' before 'const'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(358) : error C2378: 'allowed_on_typedecl' : redefinition; symbol cannot be overloaded with a typedef
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(297) : see declaration of 'allowed_on_typedecl'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(358) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(358) : error C2143: syntax error : missing ';' before '*'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(358) : error C2373: 'PSTR' : redefinition; different type modifiers
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(356) : see declaration of 'PSTR'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(358) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(359) : error C2018: unknown character '0x24'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(359) : error C2143: syntax error : missing ';' before 'const'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(359) : error C2378: 'allowed_on_typedecl' : redefinition; symbol cannot be overloaded with a typedef
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(297) : see declaration of 'allowed_on_typedecl'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(360) : error C2018: unknown character '0x24'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(360) : error C2146: syntax error : missing ';' before identifier 'PCSTR'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(360) : error C2378: 'allowed_on_typedecl' : redefinition; symbol cannot be overloaded with a typedef
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(297) : see declaration of 'allowed_on_typedecl'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(360) : error C2143: syntax error : missing ';' before '*'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(360) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(360) : error C2040: 'PCSTR' : 'int' differs in levels of indirection from 'const CHAR *'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(360) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(384) : error C2371: 'TCHAR' : redefinition; different basic types
    c:\program files\microsoft sdks\windows\v6.0a\include\specstrings_adt.h(19) : see declaration of 'TCHAR'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(390) : error C2146: syntax error : missing ';' before identifier 'PTSTR'
    c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(390) : fatal error C1003: error count exceeds 100; stopping compilation
    Build log was saved at "file://c:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\first\Debug\BuildLog.htm"
    first - 121 error(s), 30 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

  2. #2
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    If that's the entire code for your program and you're building a console app, I'd say you must have something messed up in your VC++ configuration (either in the Project or in the main VC++ options). Check the instructions on how to install the Platform SDK with VC++ to make sure you didn't miss a step.

  3. #3
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,538
    You need to enable language extensions (they should be on default, though, did you disable them?). It's under project options, c/c++, language.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #4
    Registered User
    Join Date
    Jan 2008
    Posts
    65
    Language extensions were disabled, but it worked after I installed the latest Windows SDK.

  5. #5
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,538
    Well, if it works with language extensions disabled with the latest SDK, that's great. It shows that Microsoft is finally making it possible to create apps without language extensions enabled.
    It's time to celebrate!
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Ten Errors
    By AverageSoftware in forum Contests Board
    Replies: 0
    Last Post: 07-20-2007, 10:50 AM
  2. Header File Errors...
    By Junior89 in forum C++ Programming
    Replies: 5
    Last Post: 07-08-2007, 12:28 AM
  3. Script errors - bool unrecognized and struct issues
    By ulillillia in forum Windows Programming
    Replies: 10
    Last Post: 12-18-2006, 03:44 AM
  4. executing errors
    By s0ul2squeeze in forum C++ Programming
    Replies: 3
    Last Post: 03-26-2002, 12:43 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21