[Build] MSVC shared runtime linking error for TRT, CUDA, OpenVino and DML build
Describe the issue
libcpmt.lib(StlLCMapStringA.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease'
I am seeing this error for the given build command.
@jywu-msft could these lines be related ? I saw you had the last commit to this.
Urgency
This is blocking the deployment of Intel and NV optimized path for any workstation use case.
Target platform
Windows
Build script
& .\build.bat --config "Release" --build_shared_lib --skip_tests --use_dml --use_cuda --use_cache --use_tensorrt --use_openvino --cuda_home "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3" --cmake_generator "Ninja" --cudnn_home="N:\\cudnn-windows-x86_64-8.9.7.29_cuda12" --tensorrt_home="N:\TensorRT-6.6.1.6"
For a quick reproducer add --update to the script and only run cmake --build .\build\Windows\Release\ --target onnxruntime_providers_tensorrt afterwards.
Using --enable_msvc_static_runtime builds successfully.
Error / output
Many of:
libcpmt.lib(StlLCMapStringA.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease'
Visual Studio Version
2022
GCC / Compiler Version
No response