title: How to resolve the issue "unresolved extenal symbol _DllMainCRTStartup@12"?
body: <p>I want to build a DLL file from my source code but I had an error. During the linking, the command line couldn't resolve so many objects and abandoned the linking.</p>
  
  <p>I decided to split the objects into two libraries and then to create the DLL from the two libraries.</p>
  
  <p>I run my makefile but the linking is breaking up with a new error: <code>unresolved external symbol _DllMainCRTStartup@12</code></p>
  
  <p>I use the following settings:</p>
  
  <ul>
  <li>Compiler options: <code>/Od /MT /EHsc /MP /Zi /Zl /Zp8 /c /DSOMEDEFINE</code></li>
  <li>Linker options:  <code>/MAPINFO:EXPORTS /SUBSYSTEM:WINDOWS /MACHINE:X86 /MANIFEST /INCREMENTAL:NO /NOLOGO /DLL /DEBUG /OUT:"$(__NAME).dll" /LIBPATH:$(__MS_LIB_PATH) \
  /LIBPATH:"$(SW_HOME)\lib" /LIBPATH:"$(SW_HOME)\common\lib" /PDB:"$(__NAME).pdb" /MAP:"$(__NAME).map"</code></li>
  </ul>
  
  <p>My build process runs in three steps:</p>
  
  <p>first step: compile all objects</p>
  
  <p>second step: use lib.exe to create two files with extension *.LIB</p>
  
  <p>third step: use link.exe to create DLL file from LIB files.</p>
  
  <p>but I have a linking error like in my title. </p>
  
  <p>So, I suppose that the problem happens because some paths to visual studio folder during linking are not correct or during the splitting of objects in two libraries, something is going wrong and some information is gone.
  Or I use not the correct options for the compiler and the linker. </p>
  
  <p>Could someone help me to resolve it?</p>