BullseyeCoverage
error LNK2019: unresolved external symbol atexit referenced in function cov_probe_v13
Your link command uses option /INTEGRITYCHECK,
but does not link with the C run-time library due to the compiler option /Zl or linker option /NODEFAULTLIB.
There are three alternatives.
/INTEGRITYCHECK when using BullseyeCoverage.
/Zl
/NODEFAULTLIB
WinMainCRTStartup to WinMain or
from mainCRTStartup to main.
atexit.
void (__cdecl* AtexitFunction)(void);
#if __cplusplus
extern "C"
#endif
int __cdecl atexit(void (__cdecl* func)(void))
{
AtexitFunction = func;
return 0;
}
WinMainCRTStartup or mainCRTStartup) and
before every call to ExitProcess.
if (AtexitFunction)
AtexitFunction();
BullseyeCoverage implements the atexit using a DLL,
which cannot be code signed to the requirements of the /INTEGRITYCHECK option.
When /INTEGRITYCHECK is in effect,
BullseyeCoverage falls back to the C run-time atexit.
Updated: 2 Dec 2024
Copyright © Bullseye Testing Technology. All Rights Reserved.