question

SouvikMaiti-3602 avatar image
0 Votes"
SouvikMaiti-3602 asked YujianYao-MSFT commented

Visual Studio 2019: LNK2019 error from msvcrtd.lib(utility.obj)

I'm working on upgrading a C++ DLL project (Debug, x86) from VS2008 to VS2019. While doing so, got many different link error along the way and got it resolved by adding the dependencies - ucrtd.lib, vcruntimed.lib and msvcrtd.lib. But currently stuck with the following error -

4>msvcrtd.lib(utility.obj) : error LNK2019: unresolved external symbol __vcrt_initialize referenced in function scrt_initialize_crt
4>msvcrtd.lib(utility.obj) : error LNK2019: unresolved external symbol
vcrt_uninitialize referenced in function scrt_initialize_crt
4>msvcrtd.lib(utility.obj) : error LNK2019: unresolved external symbol
vcrt_uninitialize_critical referenced in function scrt_dllmain_uninitialize_critical
4>msvcrtd.lib(utility.obj) : error LNK2019: unresolved external symbol
vcrt_thread_attach referenced in function scrt_dllmain_crt_thread_attach
4>msvcrtd.lib(utility.obj) : error LNK2019: unresolved external symbol
vcrt_thread_detach referenced in function __scrt_dllmain_crt_thread_attach
4>msvcrtd.lib(utility.obj) : error LNK2019: unresolved external symbol is_c_termination_complete referenced in function scrt_dllmain_uninitialize_c
4>msvcrtd.lib(utility.obj) : error LNK2019: unresolved external symbol
acrt_initialize referenced in function scrt_initialize_crt
4>msvcrtd.lib(utility.obj) : error LNK2019: unresolved external symbol
acrt_uninitialize referenced in function scrt_uninitialize_crt
4>msvcrtd.lib(utility.obj) : error LNK2019: unresolved external symbol
acrt_uninitialize_critical referenced in function scrt_dllmain_uninitialize_critical
4>msvcrtd.lib(utility.obj) : error LNK2019: unresolved external symbol
acrt_thread_attach referenced in function scrt_dllmain_crt_thread_attach
4>msvcrtd.lib(utility.obj) : error LNK2019: unresolved external symbol
acrt_thread_detach referenced in function _scrt_dllmain_crt_thread_detach

I have Ignore All Default Libraries set to Yes and Show Progress to /VERBOSE. The log does show it's picking the correct version of the msvcrtd.lib. Additionally, Runtime Library is set to /MDd.

Any help is much appreciated. Please let me know in case of any additional queries.

Thanks and Regards,
Souvik

c++
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Have you seen if the responses in this thread help?


0 Votes 0 ·

Hi @SouvikMaiti-3602

There is the same error as you in this issue, you could refer to the method.


0 Votes 0 ·

0 Answers