BullseyeCoverage
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
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);
Use one of the alternative resolutions listed below.
extern "C"
in front of your DllMain function definition.
For example:
extern "C" BOOL WINAPI myDllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
DllMain
.
Since this name is the default, you can delete your
link option /ENTRYPOINT
.
Updated: 22 Oct 2018
Copyright © Bullseye Testing Technology. All Rights Reserved.