I am getting this linker error.
mfcs80.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in MSVCRT.lib(dllmain.obj)
Please tell me the correct way of eliminating this bug. I read solution on microsoft support site about this bug but it didnt helped much.
I am using VS 2005 with Platform SDK
Best Answer
I had the same error message, but none of the answers here solved it for me. So if you Encounter that Problem when creating a DLL Project that uses MFC, it can be resolved by entering the following line:
to the cpp file where
DllMain
is defined. Then your ownDllMain
implementation is used, rather than the one from dllmain.obj.Source: http://social.msdn.microsoft.com/Forums/en-US/0d78aa6b-1e87-4c01-a4a7-691335b7351a/how-to-build-mfc-application-dll-in-visual-c-2010