BullseyeCoverage Up Contents Search

Error LNK2019 unresolved external symbol atexit

Symptoms

error LNK2019: unresolved external symbol atexit referenced in function cov_probe_v12

Cause

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.

Resolution

There are three alternatives.

  1. Do not use /INTEGRITYCHECK when using BullseyeCoverage.

  2. Link with the C run-time library.

  3. Implement atexit.

More Information

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