#elif is only valid within a conditional preprocessor block.
Recovery: Remove the #elif statement, or place it within a conditional preprocessor block.
#else is only valid within a conditional preprocessor block.
Recovery: Remove the #else statement, or place it within a conditional preprocessor block.
Every #endif must have a corresponding #if, #ifdef, or #ifndef.
Recovery: Remove the #endif statement, or place it after a conditional preprocessor block.
The end of the source file has been encountered prematurely.
Recovery: Check for misplaced braces.
The #error directive was encountered. Compilation terminated.
Recovery: Recompile with correct macro definitions.
Valid integer suffixes are u or U for unsigned, l or L for long, or ll or LL for long long. Unsuffixed constants are given the smallest data type that can hold the value. Refer to the C and C++ Language Reference.
Recovery: Change or remove the suffix.
The specified constant is too large to be represented by an unsigned long int.
Recovery: The constant integer must have a value less than UINT_MAX defined in <limits.h>.
Character literals must be terminated before the end of the line.
Recovery: End the character literal before the end of the line. Check for misplaced quotation marks.
The ## operator must be preceded and followed by valid tokens in the macro replacement list. Refer to the C and C++ Language Reference for information on the ## operator.
Recovery: Provide both operands for the ## operator.
The macro parameter list must be empty, contain a single identifier, or contain a list of identifiers separated by commas.
Recovery: Correct the parameter list.
The identifiers in the macro parameter list must be unique.
Recovery: Change the identifier name in the parameter list.
You can define a macro multiple times only if the definitions are identical except for white space separating the tokens.
Recovery: Change the macro definition to be identical to the preceding one, or remove it.
The number of arguments specified in the macro invocation is different from the number of parameters specified in the macro definition.
Recovery: Make the number of arguments consistent with the macro definition.
An unrecognized preprocessing directive has been encountered.
Recovery: Check the spelling and syntax or remove the directive.
The value for a #line directive must not exceed 32767.
Recovery: Ensure that the #line value does not exceed 32767.
A non-numeric character was encountered in the #line value.
Recovery: Check the syntax of the value given.
The initializers for objects of static storage duration, for elements of an array, or for members of a structure or union must be valid constant expressions.
Recovery: Remove the initialization or change the indicated initializer to a valid constant expression.
An unrecognized #pragma directive was encountered. See the C and C++ Language Reference for the list of valid #pragma directives.
Recovery: Change or remove the #pragma directive.
The operands must be of compatible type.
Recovery: Change the type of the operands.
The source file contains no code.
Recovery: Check that the file name and path are correct. Add source code to the file.
The preprocessor was unsuccessful in attempting to open the output file.
Recovery: Ensure you have write access to the file.
The value of the divisor expression cannot be zero.
Recovery: Change the expression used as the divisor.
A character sequence was encountered when the preprocessor required a new-line character.
Recovery: Add a new-line character.
An escape sequence that is not valid has been encountered in a string literal or a character literal. It is replaced by the character following the backslash (\).
Recovery: Change or remove the escape sequence.
You can define a macro multiple times in extended mode. In ANSI mode macro redefinitions are ignored.
Recovery: Change the language level to extended (with the /Se compiler option or #pragma langlvl directive), or remove the macro redefinitions.
The void type cannot appear in the argument list of a function call. The void type can appear in a parameter list only if it is a non-variable argument function. It is the only parameter in the list, and it is unnamed.
Recovery: Correct the argument or remove the argument.
You cannot declare a variable at block scope with the storage class extern and give it an explicit initializer.
Recovery: Initialize the external object in the external declaration.
If an enum constant is initialized in the definition of an enum tag, the initial value must be an integral expression that has a value representable as an int.
Recovery: Remove the initial value, or ensure that it is an integral constant expression that has a value representable as an int.
An attempt was made to redefine an external variable.
Recovery: Remove the redefinition.
Adjectives "signed" and unsigned can only modify integer type specifiers.
Recovery: Either remove the sign adjective or use a different type specifier.
Length adjectives short and long can only be applied to particular scalar types. See the C and C++ Language Reference for valid types.
Recovery: Either remove the length adjective or use a different type specifier.
The type specifier is not compatible with the type adjectives used. See the C and C++ Language Reference for valid combinations of type specifiers and adjectives.
Recovery: Either remove the adjective or use a different type specifier.
A C declaration must only have one storage class specifier.
Recovery: Ensure only one storage class is specified.
You cannot use the $ character in an identifier. An identifier can contain alphanumeric characters and underscores. An identifier must start with either an underscore or alphabetic character.
Recovery: Remove the $ character.
The compiler detected a floating-point overflow either in scanning a floating-point constant, or in performing constant arithmetic folding.
Recovery: Change the floating-point constant so that it does not exceed the maximum value.
A static function was declared and referenced in this file. The definition of the function was not found before the end of the file. When a function is declared to be static, the function definition must appear in the same file.
Recovery: Define the function in the file or remove the static storage class.
An invalid hexadecimal integer constant was specified. See the C and C++ Language Reference for details on specifying hexadecimal characters.
Recovery: Change the value to a valid hexadecimal integer constant.
An invalid octal integer constant was specified. See the C and C++ Language Reference for details on specifying octal characters.
Recovery: Change the value to a valid octal integer constant.
An invalid suboption was specified for some option.
Recovery: Change the suboption.
This pragma must be specified before the first C token in the input (including header files).
Recovery: Place the #pragma directive in the file before any C code, or remove it.
This #pragma specifies whether string literals are placed in read-only memory. It must appear only once and before any C code.
Recovery: Change the location of the directive and ensure that it appears only once in the translation unit.
There can only be one #pragma comment(copyright) per source file.
Recovery: Ensure that it occurs only once in the translation unit.
The #pragma parameters were invalid. See the C and C++ Language Reference for details on valid #pragma parameters.
Recovery: Change the parameter.
An invalid pragma was encountered and ignored.
Recovery: Ensure that the #pragma name is spelled correctly. A #pragma with equivalent function, but a different name may exist. See the C and C++ Language Reference for a list of #pragma directives.
The parameter for the macro invocation must have a complete argument.
Recovery: Complete the specification of the macro argument list. Check for missing commas.
The indirection operator requires a pointer to a complete type. A void pointer is an incomplete type that can never be completed.
Recovery: Cast the pointer to a type other than void before this operation.
Only abstract declarators can appear in cast or sizeof expressions.
Recovery: Remove the identifier from the cast or sizeof expression and replace it with an abstract declarator.
A declaration was made without a type specifier.
Recovery: Insert a type specifier into the declaration.
A struct or union member declaration must specify a name. A type cannot be followed by a semicolon.
Recovery: Declare the member with a name.
A syntax error has occurred. This message lists the tokens that were discarded by the parser when it tried to recover from the syntax error.
Recovery: Correct the syntax error and compile again.
A syntax error has occurred. This message lists the token that the parser expected and did not find.
Recovery: Correct the syntax error and compile again.
A syntax error has occurred. This message lists the tokens that the parser expected and did not find.
Recovery: Correct the syntax error and compile again.
The declaration of a struct or a union that includes an empty member list enclosed between braces is not a valid struct or union definition.
Recovery: Specify the members of the struct or union in the definition or remove the empty braces to make it a simple struct or union tag declaration.
A function declarator that is not also a function definition may not have a K&R style parameter identifier list. An example is the "x,y" in "int (*fred(a,b)) (x,y) {}".
Recovery: Remove the parameter identifier list.
The type of the argument in the function call should match the corresponding parameter type in the function declaration.
Recovery: Cast the argument to a different type, change the type or change the function prototype.
Increment and decrement operators cannot operate on pointers to function or pointers to void.
Recovery: Change the pointer to point to an object type.
A prototype specifies the number and the type of the parameters that a function requires. A prototype that does not specify the type of the parameters is not correct, for example,
fred(a,b);
Recovery: Specify the type of the parameters in the function prototype.
Functions declared at block scope can only have extern as an explicit storage class specifier and cannot be inline.
Recovery: Place the declaration of the function at file scope, or remove the storage class specifier or the inline specifier.
A structure or union type is completed when the definition of its tag is specified. A struct or union tag is defined when the list describing the name and type of its members is specified.
Recovery: Complete the struct or union definition.
Only aggregates containing named members can be explicitly initialized.
Recovery: Name the members of the struct or union.
There is a problem with the parameter list in the definition of the macro.
Recovery: Complete the parameter list. Look for misplaced or extra commas.
The #line directive requires a line number argument as its first parameter and a file name as an optional second parameter. No other arguments are allowed. A new-line character must be present after the argument list.
Recovery: Change the directive syntax.
Identical macro redefinitions are allowed but not necessary. The amount of white space separating the tokens have no bearing on whether macros are considered identical.
An attempt is being made to undefine a macro that has not been previously defined.
Recovery: Check the spelling of the macro name or remove the #undef directive.
The value for a #line directive must be a decimal constant.
Recovery: Specify a line number on the #line directive.
The directive does not allow a multibyte character literal.
Recovery: Remove the multibyte character literal.
The indicated identifier in a #if or #elif expression was assigned the default value of zero. The identifier may have been intended to be expanded as a macro.
Recovery: Add a #define for the macro before using it in a preprocessor conditional.
The expression for a preprocessor directive contains a syntax error.
Recovery: Replace the expression that controls the directive by a constant integral expression.
The file ended unexpectedly with a backslash character followed by a new-line character.
Recovery: Remove the continuation character from the last line of the file, or add code after the continuation character.
The file specified on the #include directive could not be found. See the C and C++ Language Reference for file search order.
Recovery: Ensure the #include file name and the search path are correct.
The compiler was unable to open the input file.
Recovery: Ensure the file exists and that the compiler can access it.
The compiler was unable to read the input file.
Recovery: Ensure file exists and is accessible by compiler.
The included files have been nested too deeply.
Recovery: Reduce the number of nested include files.
![]()
Summary of Compiler Error Messages