The compiler ran out of memory trying to compile the file. This sometimes happens with large files or programs with large functions. Note that very large programs limit the amount of optimization that can be done.
Recovery: Shut down any large processes that are running, ensure your swap path is large enough, turn off optimization, or limit the optimizer's working set maximum. You can also divide the file into several small sections or shorten the function.
The function definition has fewer parameters than the prototype.
Recovery: Modify one of the function declarations so that the number and types of the parameters match.
The prototyped redeclaration of the function is not correct. Fewer parameters appear before the ellipsis in this function redeclaration than the previous declaration.
Recovery: Ensure that the redeclaration is consistent with the previous declaration.
Nonprototype function declarations, popularly known as K&R prototypes, specify only the function return type. The function parentheses are empty; no information about the parameters is given.
Nonprototype function definitions specify a list of parameter names appearing between the function parentheses followed by a list of declarations (located between the parentheses and the opening left brace of the function) that indicates the type of the parameters. A nonprototype function definition is also known as a K&R function definition.
A prototype function declaration or definition specifies the type and the number of the parameters in the parameter declaration list that appears inside the function parenthesis. A prototype function declaration is better known as an ANSI prototype, and a prototype function definition is better known as an ANSI function definition.
When the nonprototype function declarations/definitions are mixed with prototype declarations, the type of each prototype parameter must be compatible with the type that results from the application of the default argument promotions.
Most types are already compatible with their default argument promotions. The only ones that aren't are char, short, and float. Their promoted versions are, respectively, int, int, and double.
This message can occur in several situations. The most common is when mixing ANSI prototypes with K&R function definitions. If a function is defined using a K&R-style header, then its prototype, if present, must specify widened versions of the parameter types. Here is an example.
int fn(short);
int fn(x)
short x;
{}
This is not valid because the function has a K&R-style definition and the prototype does not specify the widened version of the parameter. To be correct, the prototype should be
int fn(int);
because int is the widened version of short.
Another possible solution is to change the function definition to use ANSI syntax. This particular example would be changed to
int fn(short);
int fn(short x)
{}
This second solution is preferable, but either solution is equally valid.
Recovery: Give a promoted type to the parameter in the prototype function declaration.
A prototype declaration of the function specifying the number and type of the parameters was not found before the function was used. Errors may occur if the function call does not respect the function definition.
Recovery: Add an appropriate function prototype before calling the function.
A subscript was specified in the offsetof macro but the operand is not an array.
Recovery: Either change the operand to be an array type or remove the subscript operator.
The offsetof macro is evaluated at compile time. Thus all arguments must be constant expressions.
Recovery: Change the expression.
The first operand of the offsetof macro must be a structure or union type.
Recovery: Change the operand.
An incomplete struct or union is not a valid argument to the offsetof macro. A structure or union type is completed when the definition of its tag is specified.
Recovery: Ensure the struct or union is a complete type.
The tag will be added to parameter scope. Thus it will go out of scope at the end of the declaration or function definition.
Recovery: If the tag is needed for declarations outside its scope, move the tag declaration outside of parameter scope.
All but the last character in the constant will be discarded.
Recovery: Remove all but one character or change the character constant into a string literal.
Do not redefine internal compiler names.
Recovery: Remove the macro definition or change the name of the macro being defined.
Do not redefine internal compiler names.
Recovery: Remove the macro undefinition.
The tag used in the type declaration of the object has gone out of scope, however the object is still referenced in the expression.
Recovery: Either remove the reference to the object or move the tag's definition to a scope that encloses both the referenced object and the object's declaration.
The operand must be a complete type for the compiler to determine its size.
Recovery: Provide a complete type definition.
There can only be an initializer for the first named member of a union.
Recovery: Remove all union initializers other than the one attached to the first named member.
The multibyte character specified is not valid.
Recovery: Correct the multibyte character.
The type long float is not valid; it is treated as a double.
Recovery: Remove the long type specifier or use double instead of float.
The cast between the two types is not allowed.
Recovery: Remove the cast.
The compiler was unable to open the listing file.
Recovery: Ensure the file exists and that the compiler can access it.
Valid hex digits are the letters A,B,C,D,E,F,0,1,2,3,4,5,6,7,8,9.
Recovery: Change the digit.
There is more than one definition of an identifier.
Recovery: Remove one of the definitions or change the name of the identifier.
Identifier names in a parameter list must be unique.
Recovery: Change the name of the identifier or remove the parameter.
Pascal strings have a length limit of 255 characters.
Recovery: Shorten the length of the string.
A Pascal string is prefixed with a "\P". The string length is encoded in the string and it is not null terminated. A 'C' string is a null terminated string. The two are not compatible. Concatenation requires that both strings be of the same type.
A Pascal string is prefixed with a "\P". The string length is encoded in the string and it is not null terminated. A 'C' string is a null terminated string. The two are not compatible. Concatenation requires that both strings be of the same type.
A string that has a prefix L cannot be concatenated with a string that is not prefixed. Concatenation requires that both strings be of the same type.
Recovery: Check the syntax of the value given.
A string that has a prefix L cannot be concatenated with a string that is not prefixed.
Recovery: Check the syntax of the value given.
A #include directive was specified across two or more lines.
Recovery: Ensure that the #include directive and its arguments are contained on a single line.
You can ignore this message if you intended "/*" to be part of the comment. If you intended it to start a new comment, move it out of the enclosing comment.
Recovery: Remove "/*" or ensure that "/*" was intended in the comment.
The redeclaration is not compatible with the previous declaration.
Recovery: Either remove one declaration or make the types compatible.
Member names must be unique within the same aggregate.
Recovery: Change the name.
The precompiled header file may have become corrupt and is ignored.
Recovery: Regenerate the precompiled header files.
The compiler was unable to open the precompiled header file for reading and will use the original header.
Recovery: Regenerate the precompiled header files.
The compiler cannot understand the format of the precompiled header, since it was generated using a more recent version of the compiler. The original text version of the header will be used.
Recovery: Regenerate the precompiled header files.
The compiler was unable to write to the precompiled header files.
Recovery: Ensure that the compiler has write access to the precompiled header files.
If an enum constant is initialized in the definition of an enum tag, the value that it is initialized to 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 error occurred during compilation.
Recovery: Ensure the compiler has write access to the directory specified by the TMP environment variable and that there is enough disk space free. Recompile the module.
An error occurred during compilation.
Recovery: Recompile module. Ensure the compiler has write access to the directory specified by the TMP environment variable and that there is enough disk space free.
The values specified for the arch and tune options are not compatible.
Recovery: Change option values.
Pascal strings are not compatible with multibyte characters.
Recovery: Do not combine Pascal strings with multibyte characters.
An attempt has been made to change the ENUM option inside of an enum declaration. This is not allowed because it would make the storage type of the enumerated values inconsistent.
Recovery: Move the option to before or after the enum declaration.
There is no code in the compilation unit.
Recovery: Ensure the correct source file is specified. Recompile.
A prototype could not be generated for the function because the enum, struct or union declaration did not have a tag.
Recovery: Specify a tag.
This message indicates where a previous definition is located.
Recovery: Remove one of the definitions or change the name of the identifier.
An automatic variable that has a const member is not initialized. The compiler is using zero as the initializer.
Recovery: Initialize the const member.
The repetition of the #pragma is redundant and is ignored.
Recovery: Remove the duplicate #pragma.
A previous #pragma for the object is taking precedence over this #pragma.
Recovery: Remove one of the #pragma directives.
A #pragma refers to an identifier that has not been declared.
Recovery: Declare identifier or remove #pragma.
Objects must be packed on 1, 2, 4, 8 or 16 byte boundaries.
Recovery: Change the packing specifier.
An inappropriate calling convention has been specified for the main function. This function is the starting point of the program so only _Optlink calling conventions is allowed.
Recovery: Remove explicit calling convention specifier for main.
A declaration can specify only one calling convention.
Recovery: Remove extra calling convention specifiers.
A calling convention protocol keyword has been applied to an identifier that is not a function type or a typedef to a function type.
Recovery: Check that correct identifier is specified or remove #pragma.
A declaration has been discovered which resembles int foo _System ();. Keyword _System must appear immediately to the left of the identifier "foo".
Recovery: Correct the declaration.
The redeclaration of this function cannot have a different calling convention than the previous declaration. The function could have been given a calling convention through a typedef, or via a previous declaration.
Recovery: Make sure all declarations of the function specify the same calling convention.
A callback function cannot have a 16-bit fastcall calling convention. However, you can call 16-bit fastcall functions.
Recovery: Change the calling convention.
A function with _Pascal calling convention cannot have a variable number of parameters.
Recovery: Change the calling convention protocol specification or change the declaration to be a fixed parameter function.
Precompiled header files are not compatible with some utilities so the precompiled header files may not be used.
Recovery: Do not use precompiled headers with the specified utility.
When there is a conflict between options and precompiled header files, the option to generate precompiled header files is also ignored to avoid refreshing the precompiled header files.
Recovery: Do not use precompiled header files with the specified utility.
The types pointed to by the two pointers are not compatible.
Recovery: Change the types to be compatible.
Recovery: Specify the ring zero option (/Gr) on the command line or change the calling convention.
The number of fixed parameters in the redeclaration of the function does not match the original number of fixed parameters.
Recovery: Change the declarations to have the same number of parameters, or rename or remove one of the declarations.
The type of the corresponding parameter in the previous function declaration is not compatible.
Recovery: Change the parameter declaration or rename the function declaration.
A function prototype and a nonprototype declaration can not be compatible if one contains "...".
Recovery: Convert nonprototype declaration to a prototyped one or remove the "...".
Nonprototype declarations have their parameters automatically promoted. Integral widening conversions are applied to integral types and float is converted into double.
Recovery: Promote the parameter types in the prototyped declaration.
Nonprototype declarations have their parameters automatically promoted. Integral widening conversions are applied to integral types and float is converted into double.
Recovery: Promote the parameter types in the prototyped declaration.
The types of the parameters must be compatible.
Recovery: Change the parameters so that they are compatible.
The two types are not compatible.
Recovery: Change the parameter types so that they are compatible.
The identifier must have external linkage.
Recovery: Change the storage class to extern.
"&1" should be a function symbol.
Recovery: Specify a different name or change the type of the symbol.
The user segment has already been specified as being another type of segment. Data segments and text segments must have distinct names.
Recovery: Remove one of the declarations for the segment.
There can only be a certain number of user-defined segments and this limit has been exceeded.
Recovery: Reduce the number of user-defined segments.
Enums may be 1, 2, or 4 bytes in size.
Recovery: Change the value specified for the enum packing option (/Su).
Refer to the C and C++ Language Reference for more information about the valid values for the #pragmas.
Recovery: Specify a different value.
A compiler option or #pragma directive was used to limit the valid text region in a source file.
Recovery: Remove the /Sg or /Sq option, or remove the #pragma margins or sequence, or specify a more inclusive text region.
An object or function has both a definition and an import directive in this compilation unit. This creates a conflict, since the function or object can be defined either here or where it is exported from, but not both.
Recovery: Remove the #pragma import directive or __import keyword or change the definition of the object or function into an extern declaration.
You cannot define the function or variable if it is used in a #pragma import.
Recovery: Rename the variable.
Module name is the name of the DLL where the entry point of the import function exists. It must be specified in the parameter list of #pragma import.
Recovery: Name the DLL in the parameter list.
A non-numeric character was encountered in the &1 value.
Recovery: Check the syntax of the value given.
The specified ordinal number should be between 0 and 65535, inclusive.
Recovery: Change the value accordingly.
The identifier specified by the pragma is not a function or external object.
Recovery: Declare the object with storage class "extern".
The option is not compatible with another option so it is ignored.
Recovery: Remove one of the options.
Only defined variables or functions can be specified as an export.
Recovery: Define the function or variable.
The specification of the bit-field type may cause problems with porting the code to another system.
Recovery: Change the type specifier.
The alignment of an aggregate is constant throughout its definition.
![]()
Summary of Compiler Error Messages