Note that there are some explanatory texts on larger screens.

plurals
  1. POVisual C++ 2005 doesn't add /dll argument for linker
    text
    copied!<p>What setting(s) in a Visual Studio 2005 project could cause the build to not add the /dll argument to the linker command line?</p> <p>Background:</p> <p>We have a large VC6 project that I'm porting over to VC 2005. This project contains a number of MFC extension DLLs, and I'm running into the following linker warning when I run a build:</p> <p>warning LNK4086: entrypoint '_WinMainCRTStartup' is not __stdcall with 12 bytes of arguments; image may not run</p> <p>The reference to _WinMainCRTStartup is highly suspicious, because this is a DLL (which shouldn't have a _WinMainCRTStartup function at all). A search for of the sources indicate that there is no such function defined, so my conclusion is that it it being provided to us by the linker.</p> <p>Review of the linker.exe command line arguments shows the problem (I've removed full paths for brevity):</p> <p>/OUT:"Debug\thedll.dll" /INCREMENTAL /MANIFEST /MANIFESTFILE:"Debug\thedll.dll.intermediate.manifest" /DEF:".\thedll.def" /DEBUG /PDB:"\Debug\thedll.pdb" /SUBSYSTEM:WINDOWS /MACHINE:X86 version.lib</p> <p>There is a highly critical command line argument missing: /DLL</p> <p>If I manually add this argument (using the project properties, Configuration Properties\Linker\Command Line settings), I can get things to compile properly.</p> <p>But I'm wondering what in the project configuration is causing the /DLL command line setting of linker.exe to be left out?</p> <p>I've created a temporary project with an extension DLL, and I've done side-by-side comparisons of the .vcproj files, but I can not see any specific settings that would impact this.</p> <p>EDIT - I've checked the Configuration Properties\General\Project Defaults setting for Configuration Type. It is set to Dynamic Library (.dll)</p> <p>EDIT2 - Apparently, VS was ignoring the setting until I manually adjusted it. rggggg</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload