Note that there are some explanatory texts on larger screens.

plurals
  1. POMSBuild.exe doesn't respect /MT compiler flag?
    primarykey
    data
    text
    <p>I was surprised to see that after switching our build system from VS2008 to VS2010 our application now complains that MSVCR100.dll is missing at runtime. I checked our project's build options and we are specifying Multi-threaded (/MT) for the Runtime Library. However, when we build using the GUI, the DLL is statically linked and the error does not appear. The error only happens when we build using MSBuild.exe from the command line. </p> <p>I compared the command lines, and they are almost the same, both specify /MT:</p> <p><strong>VS2010 GUI:</strong></p> <blockquote> <p>/nologo /W3 /WX- /O2 /Oi /Oy- /GL /D "_CRT_SECURE_NO_WARNINGS" /D "GSL_DLL" /D "WIN32" /D >"_WINDOWS" /D "_USRDLL" /D "_VC80_UPGRADE=0x0710" /D "__STDC_CONSTANT_MACROS" /D >"_WINDLL" /D "_UNICODE" /D "UNICODE" /Gm- /EHsc /MT /GS /Gy /fp:precise /Zc:wchar_t >/Zc:forScope /Fp"Release\Temp\ourProject.pch" /Fa"Release\Temp\" /Fo"Release\Temp\" >/Fd"Release\Temp\vc100.pdb" /Gd /analyze- /errorReport:queue </p> </blockquote> <p><strong>MSBuild.exe:</strong></p> <p>MSBuild.exe "%WORKSPACE%\OurProject.vcxproj" /t:Rebuild /p:Configuration=Release</p> <blockquote> <p>/nologo /W3 /WX- /O2 /Oi /Oy- /GL /D _CRT_SECURE_NO_WARNINGS /D GSL_DLL /D WIN32 /D _WINDOWS /D _USRDLL /D _VC80_UPGRADE=0x0710 /D __STDC_CONSTANT_MACROS /D _WINDLL /D _UNICODE /D UNICODE /Gm- /EHsc /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope > /Fo"Release\Temp\" /Fd"Release\Temp\vc100.pdb" /Gd /TP /analyze- /errorReport:queue </p> </blockquote> <p>I have seen some posts about <a href="https://stackoverflow.com/questions/6437538/vs2010-static-linking-issue">VS2010 static linking not behaving as expected</a>, however my project builds and links just fine. It is not until runtime that it cannot find the required DLL. Installing the VS2010 runtime or shipping with the runtime are options we are trying to avoid.</p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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