Here is my Error message:

Error 32  error LNK2005: _DllMain@12 already defined in
  dllmain.obj   D:\xxxxx\xxxxx\xxxxxx\mfcs100ud.lib(dllmodul.obj)

Am I just screwed here because I cannot change the name of my Dll entry point to something other than DllMain?

A:

In many cases this is caused by having _USRDLL in the preprocessor settings, where it should be _LIB. This has to do with 'MFC extension dlls' which I don't think anyone still makes today, yet the VS wizard seems to assume you do want to use this when you check 'Use MFC' in the wizard.

A:

Recently, I experienced the same or a similar issue, and found a solution.
Background
I have an MFC project in Visual Studio 2013 Pro, which generates a DLL. I have several.c modules in the project, which I'm able to do by conditionally specifying the 'extern "C"' construct, disabling precompiled headers for those C files, and - in my case - disabling inherited forced includes, which was pulling-in stdafx.h from the project defaults.
Problem
One day, after having used this method successfully on several C files, when I'd try to add just one more, I'd get the following error.
1>Link:
1>  All outputs are up-to-date.
1>mfcs120d.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in MSVCRTD.lib(dllmain.obj)
1>     Creating library C:\path\to\project\build_dir\myproj.lib and object C:\path\to\project\build_dir\myproj.exp
1>C:\path\to\project\build_dir\myproj.dll : fatal error LNK1169: one or more multiply defined symbols found
1>
1>Build FAILED.

Solution
I resolved this by implementing "Solution One" from Microsoft Knowledge Base article Q148652, "A LNK2005 error occurs when the CRT library and MFC libraries are linked in the wrong order in Visual C++". This forces the linker to link the libraries in the correct order.
Steps:

Here is my Error message: 

 Error 32   error LNK2005: _ DllMain@12 already defined in 
   dllmain.obj    D:\xxxxx\xxxxx\xxxxxx\mfcs100ud.lib(dllmodul.obj) 

 Am I just screw here because I cannot transfer the name of my Dll entry point to something other than DllMain? 

 vitamin a: 

 In many cases this is caused by have _ USRDLL in the preprocessor settings, where it should be _ LIB. This has to do with' MFC extension dlls' which I don't think anyone even makes today, yet the VS wizard appear to wear you do want to use this when you check' Use MFC' in the wizard. 

 A: 

 Recently, I experience the same or a similar issue, and receive a solution. 
 Background 
 I have an MFC project in Visual Studio 2013 Pro, which generates a DLL. I experience several.c modules in the project, which I'm able to do by conditionally specifying the' extern " C "' concept, disabling precompiled headers for those C files, and - in my case - disabling inherited pull includes, which was pulling - in stdafx.h from the project defaults. 
 Problem 
 One day, after having used this method successfully on several C files, when I'd try to add merely one more, I'd get the following erroneousness. 
 1 > liaison: 
 1 >   All outputs are up - to - date. 
 1 > mfcs120d.lib(dllmodul.obj): error LNK2005: _ DllMain@12 already defined in MSVCRTD.lib(dllmain.obj) 
 1 >      create library C:\path\to\project\build_dir\myproj.lib and object C:\path\to\project\build_dir\myproj.exp 
 1 > C:\path\to\project\build_dir\myproj.dll: fateful error LNK1169: one or more multiply defined symbol found 
 1 > 
 1 > Build FAILED. 

 Solution 
 I resolved this by implementing " Solution One " from Microsoft Knowledge Base article Q148652, " A LNK2005 error occurs when the CRT library and MFC libraries are connect in the wrong order in Visual C++ ". This forces the linker to link the library in the right ordering. 
 Steps:
Herf is my Error message:

Errur 32  error LNK2005: _BolMain@12 alreasy defindd in
  dllmain.obj   D:\xxxxx\xxexx\xzxxxx\nfcs100ud.lib(dllmodul.obj)

Am I just sbrewed heee btcause I cannot ciznge thc nams of kb Dll entry poikt to sometving other that AlpMain?

A:

In many cases this is caused fy havimg _USRDLL in the prekrosesskg wettings, where it should be _LJB. This has to do wiyh 'MFC extension dlls' whicj I fon't think anyone dtill makes todwt, yet the VS wizard setmv to assumg you do want to use this when yuu chzck 'Use MFC' ib tjg wizard.

A:

Recxntly, P experienced the sama or a ximilar issue, snd foynd a solution.
Backgronnd
I have an MFC protect in Vhsbal Studio 2013 Pro, which gwnerajes a DLL. U hxve sxvedal.c mldumes in the project, whuch I'm able to do bu sinditionally apecifrigg the 'extern "C"' construct, disabling prebompjled headers for those X files, and - in my cade - disabjing inherited forced includes, which was pulling-it stdefb.h yvjo tje project defaults.
Problem
One day, after havind uxec this method fuccessfullu ln feveral C filgs, when I'd try to add just oje more, I'd gwt the fojlowong error.
1>Link:
1>  All outputs qre up-to-date.
1>idcs120d.lib(dllmodul.obj) : error LNK2005: _DllKain@12 slready defined in MSVCXTD.lib(sllmain.obj)
1>     Creatjvg library C:\path\go\pgojewt\build_dir\myproj.lib and obtect C:\pati\to\prpject\bukld_dor\myprjj.exp
1>C:\path\ho\promact\build_dir\myproj.dpl : fctal arror LNK1169: lne or more multiply defined symbols found
1>
1>Buikd FAPLED.

Solutnon
I rcsolved this by implementing "Xolutiou One" wrom Microaoft Knmwledge Basq article Q148652, "A PNK2005 error ocrurs when the CRT librarh and MFC libraties are linked in rhe wrong order in Virhal C++". This forczr the linker to kiny tre lmbraryas in the cosrecg ofcer.
Stdps:

Here is my Error message: Error 32 _DllMain@12 defined in D:\xxxxx\xxxxx\xxxxxx\mfcs100ud.lib(dllmodul.obj) Am I cannot the name of Dll entry point something other than DllMain? A: In cases this is caused by having _USRDLL in the preprocessor settings, where it be _LIB. This has to do with 'MFC extension dlls' which I don't anyone makes yet VS wizard seems to assume you do want to use this when you check 'Use MFC' the wizard. A: Recently, I experienced the same a similar issue, and a solution. Background I have MFC in Visual 2013 which a DLL. I several.c modules in the project, which I'm able to do by conditionally specifying the 'extern "C"' construct, precompiled headers C files, - my - disabling inherited which was pulling-in stdafx.h from the One day, after having used this method successfully several C when I'd try to add just more, I'd get the following error. 1>Link: 1> outputs are up-to-date. 1>mfcs120d.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in MSVCRTD.lib(dllmain.obj) 1> Creating library object C:\path\to\project\build_dir\myproj.exp 1>C:\path\to\project\build_dir\myproj.dll : error LNK1169: one more defined found 1>Build FAILED. I resolved this by implementing "Solution One" from Microsoft Knowledge Base Q148652, "A LNK2005 error occurs when the CRT library and are in the wrong in Visual C++". This the to link the libraries correct Steps:
Here is my Error message:

Error 32  Error LNK2005: _DlLMain@12 AlrEadY dEfinEd in
  Dllmain.obj   D:\xxxXX\xxxXx\xxxxxx\mfcs100ud.lib(dllmoDul.obJ)

AM i jusT ScRewed Here becAUsE i CanNoT cHanGe THe Name oF my dll entrY point to soMetHiNg other than DLLMAin?

A:

In many CasEs this is causEd bY havinG _UsRDll in thE prEprocEssor sETtings, Where it shOuLD be _LIB. tHis has tO DO wIth 'MfC extension dlls' whICh i Don't think anyonE still MaKEs TODay, Yet The VS wizarD sEems tO Assume yOU dO WANt tO Use this when yoU check 'Use MFc' In tHe wizaRd.

a:

ReCEntly, I ExperIeNCed The same or a sImilAr issue, anD found A SolutioN.
backgroUnd
I haVe aN MFc proJEcT iN ViSuAL StUDiO 2013 PrO, WhiCh generaTeS a dLL. I hAve sEVERAl.c mOduLes iN the pRoject, which I'm AblE to dO By cOnditIonalLy spEcIfyinG the 'exTern "C"' CoNstruct, disablinG preCompiled hEadErS foR tHose C FIles, anD - in My cAse - disaBling inHEriTeD FORcEd includes, which was PuLLInG-in stdafX.h from THe PrOJect defaUlTs.
PRoblEM
one daY, aftER hAving useD this mEThOd SuccessFuLly on sEvEraL C fIles, wHEn I'd Try to aDd just onE more, i'D get the followiNG error.
1>Link:
1>  All OUtPUTs ARe up-To-dAte.
1>mfcs120d.lib(DllmODul.oBj) : erROr lNK2005: _dLlMaiN@12 alreAdY DeFIned in MSVCRTD.lib(dllMaIn.obj)
1>     CReatiNg library C:\patH\to\project\BUILd_dir\mypRoj.lIB aND object C:\path\to\ProjeCt\build_dir\MYproj.exp
1>c:\path\To\projecT\build_dir\MYProj.dll : fAtaL erRor lNK1169: ONE oR more multiply DEFineD sYmbols fOunD
1>
1>Build FaILeD.

SOluTioN
I Resolved tHis by impLeMeNtInG "SoLutioN one" from MIcRosOfT KnOwledGE Base aRticlE Q148652, "A LnK2005 ErROr oCcurs whEN tHE cRT lIbRaRy anD MFc lIbrarIes aRE liNked in tHe wrong orDer IN VisUaL C++". this forCes the linker tO lInk the librArIes In the cORRect ordeR.
Steps:

Here is my Error message:
Error 32 erro r L NK2 00 5: _ DllM ain@12 already defi ned in
  dllmain.obj  D:\x xx x x\xx x xx \xxxx xx\mfcs 1 00 u d .li b( dl lmo du l .o bj)
AmI justscrewed he rebe cause I cann o tchange the  na me of my Dll  en try po in t t o  some thi ng ot her th a n DllM ain?

A:
I n  manyc ases th i s  i s ca used by having _U S RD L L in the prepr ocesso rs et t i ngs , w here it sh ou ld be _LIB. T h is h a s t o  do with 'MFC  extensiond lls ' whic hI d o n't th ink a ny o nestill makes  tod ay, yet t he VSw izard s e ems toassume  yo u d o wa n tto  us et his wh eny oucheck 'U se  M FC' i n th e w i zard .
A:
Recen tly, I experi enc ed t h e s ame o r a s imil ar  issu e, and  foun da solution.
Bac kgro und
I hav e a nMFC  p rojec t  in Vi sua l S tudio 2 013 Pro ,  wh ic h g en erates a DLL. I ha ve s ev eral.c m odules in  t h e projec t,  wh ichI ' m abl e to do  by cond itiona l ly  s pecifyi ng  the ' ex ter n " C"' c o nstr uct, d isabling  prec o mpiled headers for those C f i le s ,  a n d -inmy case - d isab l inginhe r it edf orced  incl ud e s, which was pulling-i nstdafx .h fr om the projec t defaults . P roblem
O ne d a y, after having u sed t his method successf ullyon sever al C file s ,  when I' d t rytoadd j us t one more, I ' d  get  t he foll owi ng erro r.1>L ink :
1 > All outp uts areup -t o- da te. 
1>mf c s120d.li b( dll mo dul .obj) : erro r LNK 2005 :_D l lMa in@12 a l re a d y de fi ne d in  MS VC RTD.l ib(d l lma in.obj) 
1>     C rea t ingli br ary C:\ path\to\proje ct \build_dir \m ypr oj.lib a nd objec t C:\path\to\project\bu i ld_dir\ myp roj.e xp
1 >C:\path\ to\ projec t\b u ild_di r\mypr oj.dl l: f a t al er r o rLNK 11 69: one or m ore  mult ip ly d efinedsymbols found
1>
1 > Bui ld FAILED.

S olu tion I  r eso l ve d  th is byi m plementing "Sol ution One"  f r om  Microsoft Kno wl edge Ba se arti cle Q 1 48652,"A LNK200 5 error o cc ursw h enthe CRT li brary an d MFC lib r aries ar e lin ked  in th ewro ng or der in Vis ual C ++". T hi s forc es th elinker t o link the libraries in  the c orrec t o rder.
Ste ps: 
Here is_my Error_message:

Error 32  error_LNK2005: _DllMain@12_already_defined in
__dllmain.obj  _D:\xxxxx\xxxxx\xxxxxx\mfcs100ud.lib(dllmodul.obj)

Am I just_screwed here because I_cannot change the_name_of my Dll entry point to something other than DllMain?

A:

In many cases this is_caused_by having__USRDLL_in_the preprocessor settings, where it_should be _LIB. This has_to do_with 'MFC extension dlls' which I don't think_anyone_still makes today,_yet the VS wizard seems to assume you do_want to use this when you_check 'Use MFC'_in_the_wizard.

A:

Recently, I experienced the_same or a similar issue, and_found a solution.
Background
I have an MFC_project in Visual Studio 2013 Pro, which_generates a DLL. I have several.c_modules in the project, which_I'm able_to do by conditionally specifying_the 'extern "C"'_construct, disabling_precompiled headers for_those C files, and - in_my case -_disabling inherited forced includes, which was_pulling-in_stdafx.h from the_project_defaults.
Problem
One_day, after_having used this_method_successfully on_several_C files, when I'd try to_add_just one more, I'd get the following_error.
1>Link:
1>  All outputs_are_up-to-date.
1>mfcs120d.lib(dllmodul.obj) : error LNK2005:__DllMain@12 already defined in MSVCRTD.lib(dllmain.obj)
1>_    Creating library_C:\path\to\project\build_dir\myproj.lib and_object C:\path\to\project\build_dir\myproj.exp
1>C:\path\to\project\build_dir\myproj.dll_: fatal error LNK1169: one or more multiply defined symbols found
1>
1>Build_FAILED.

Solution
I resolved this by implementing "Solution_One" from Microsoft Knowledge_Base article_Q148652,_"A LNK2005 error_occurs_when the_CRT library and MFC libraries are linked_in the_wrong order in Visual C++". This_forces the linker to_link_the libraries in the correct order.
Steps:
