atexit expects cdecl, but if you are compiling with a different default call convention Free_Argv will fail to compile with function': cannot convert from 'void (__fastcall *)(void)' to 'void (__cdecl *)(void) in the case of fastcall being the default.