BullseyeCoverage Up Contents Search

Error LNK2001 Unresolved Symbol on DLL Entry Point

Symptoms

The error shown below occurs when linking a DLL.

entry-varies.obj : error LNK2001: unresolved external symbol DllMain@12
fatal error LNK1120: 1 unresolved externals

Cause

Your DLL entry point DllMain calling convention, parameters, or return type do not conform to the Win32 specification for DllMain:

BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved);

Resolution

Use one of the alternative resolutions listed below.

Updated: 22 Oct 2018