I have written a program which needs to use libtorch libs. I use libtorch-win-shared-with-deps-1.5.0 package,I have configured my project to make linker->input include c10.lib as shown below
When I compile this project I received three link error:
LNK2019 无法解析的外部符号 "__declspec(dllimport) public: class
c10::basic_string_view<char> __cdecl caffe2::TypeMeta::name(void)const
" (__imp_?name@TypeMeta@caffe2@@QEBA?AV?$basic_string_view@D@c10@@XZ)
LNK2019 无法解析的外部符号 "__declspec(dllimport) public: class
c10::DispatchKeySet __cdecl c10::TensorOptions::key_set(void)const "
(__imp_?key_set@TensorOptions@c10@@QEBA?AVDispatchKeySet@2@XZ)
LNK2019 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl
c10::TensorImpl::set_allow_tensor_metadata_change(bool)"
(__imp_?set_allow_tensor_metadata_change@TensorImpl@c10@@QEAAX_N@Z)
it looks like I did not specify the right *.lib, but when I inspect the c10.lib which I specified, I get this:
It looks like my configuration is right and I have specified the right c10.lib, but why I get this link error?