webrtc - 禁止使用 libcmt
webrtc - Disable the use of libcmt
我正在使用 webrtc,我想避免使用 libcmt,因为报告了链接错误。这是错误:
LIBCMT.lib(invarg.obj) : error LNK2005: __invalid_parameter already defined in MSVCRTD.lib(MSVCR120D.dll)
我已在 common.gypi 中阅读过此内容,但我不知道如何执行该操作,因为我找不到 include.gypi 的位置。我正在使用 C++ 实现。
# Although base/allocator lets you select a heap library via an
# environment variable, the libcmt shim it uses sometimes gets in
# the way. To disable it entirely, and switch to normal msvcrt, do e.g.
# 'win_use_allocator_shim': 0,
# 'win_release_RuntimeLibrary': 2
# to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
有人知道吗?
解决方案:
/NODEFAULTLIB:libcmt.lib 在文件 common.gypi 下 chromium/src/build
我正在使用 webrtc,我想避免使用 libcmt,因为报告了链接错误。这是错误:
LIBCMT.lib(invarg.obj) : error LNK2005: __invalid_parameter already defined in MSVCRTD.lib(MSVCR120D.dll)
我已在 common.gypi 中阅读过此内容,但我不知道如何执行该操作,因为我找不到 include.gypi 的位置。我正在使用 C++ 实现。
# Although base/allocator lets you select a heap library via an
# environment variable, the libcmt shim it uses sometimes gets in
# the way. To disable it entirely, and switch to normal msvcrt, do e.g.
# 'win_use_allocator_shim': 0,
# 'win_release_RuntimeLibrary': 2
# to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
有人知道吗?
解决方案:
/NODEFAULTLIB:libcmt.lib 在文件 common.gypi 下 chromium/src/build