C Run-Time Errors R6002 through R6025

The following descriptions cover C Run-Time Errors R6002 through R6025 for mixed-language programming:

C Run-Time Error R6002
floating-point support not loaded

The program needs the floating-point library, but the library was not linked to the program. One of the following may have occurred:

C Run-Time Error R6005
not enough memory on _exec
Not enough memory was available to load the process being spawned. This error occurs when a child process that was spawned by one of the _exec library routines fails and the operating system cannot return control to the parent process.

C Run-Time Error R6006
invalid format on _exec

The file to be executed by one of the _exec functions was not in the correct format for an executable file. This error occurs when a child process that was spawned by one of the _exec library routines fails and the operating system cannot return control to the parent process.

C Run-Time Error R6007
invalid environment on _exec

During a call to an _exec function, the operating system found that the child process was given an invalid environment block. This error occurs when a child process that was spawned by one of the _exec library routines fails and the operating system cannot return control to the parent process.

C Run-Time Error R6008
not enough space for arguments

There was enough memory to load the program but not enough memory to create the argv array. One of the following may be a solution:

C Run-Time Error R6009
not enough space for environment

There was enough memory to load the program but not enough memory to create the envp array. One of the following may be a solution:

If your program uses the compact, large, or huge memory model, this error may be avoided by using LINK's /CPARM:1 command-line option. This option causes unused near heap space to be allocated to the far heap.

C Run-Time Error R6016
not enough space for thread data

The program did not receive enough memory from the operating system to complete a _beginthread call. When a new thread is started, the library must create an internal database for the thread. If the database cannot be expanded with memory provided by the operating system, the thread will not begin and the calling process will stop.

C Run-Time Error R6017
unexpected multithread lock error

The process received an unexpected error while trying to access a C run-time multithread lock on a system resource. This error usually occurs if the process inadvertently alters the run-time heap data. However, it can also be caused by an internal error in the run-time or operating-system code.

C Run-Time Error R6018
unexpected heap error

The program encountered an unexpected error while performing a memory-management operation. This error usually occurs if the program inadvertently alters the run-time heap data. However, it can also be caused by an internal error in the run-time or operating-system code. If your compiler provides a library containing _heapchk and _heapwalk, you can use these functions to diagnose this error.

C Run-Time Error R6019
unable to open console device

The program called a console function declared in CONIO.H, but the operating system did not grant access to the console.

C Run-Time Error R6021
no main procedure

The program does not have a procedure called main. Make sure that all object and library modules have been linked into the executable.

C Run-Time Error R6024
not enough space for _onexit/atexit table

There was no memory available for the _onexit or atexit function. This error is caused by a low-memory condition.

C Run-Time Error R6025
pure virtual function call

No object has been instantiated to handle the pure virtual function call. This error is caused by calling a virtual function in an abstract base class through a pointer that is created by a cast to the type of the derived class, but is actually a pointer to the base class. This can occur when casting from a void* to a pointer to a class when the void* was created during the construction of the base class.