'identifier' : must be a function of type 'type'
You have declared a version of the atexit function that does not match the version declared internally by the compiler. The function atexit must be declared as follows:
int __cdecl atexit(void (__cdecl *)());