Missing symbols when building UE 5.3.2 based project with libtorch dependency

19 views Asked by At

I have a UE 5.3.2 based project with a libtorch included. I'm using libtorch 2.1.0+cpu. The linker error I have is:

1>------ Building 2 action(s) started ------
1>[1/2] Link [x64] UnrealEditor-RASample.dll
1>   Creating library C:\UnrealProjects\RASample_5.3.2\Intermediate\Build\Win64\x64\UnrealEditor\Development\RASample\UnrealEditor-RASample.sup.lib and object C:\UnrealProjects\RASample_5.3.2\Intermediate\Build\Win64\x64\UnrealEditor\Development\RASample\UnrealEditor-RASample.sup.exp
1>RASampleCharacter.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned short const caffe2::detail::std_string_metadata_index" (__imp_?std_string_metadata_index@detail@caffe2@@3GB) referenced in function "private: static unsigned short __cdecl caffe2::TypeMeta::_typeMetaData<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >(void)" (??$_typeMetaData@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@TypeMeta@caffe2@@CAGXZ)
1>RASampleCharacter.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned short const caffe2::detail::uint16_t_metadata_index" (__imp_?uint16_t_metadata_index@detail@caffe2@@3GB) referenced in function "private: static unsigned short __cdecl caffe2::TypeMeta::_typeMetaData<unsigned short>(void)" (??$_typeMetaData@G@TypeMeta@caffe2@@CAGXZ)
1>RASampleCharacter.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned short const caffe2::detail::char_metadata_index" (__imp_?char_metadata_index@detail@caffe2@@3GB) referenced in function "private: static unsigned short __cdecl caffe2::TypeMeta::_typeMetaData<char>(void)" (??$_typeMetaData@D@TypeMeta@caffe2@@CAGXZ)
1>RASampleCharacter.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned short const caffe2::detail::std_unique_ptr_std_mutex_metadata_index" (__imp_?std_unique_ptr_std_mutex_metadata_index@detail@caffe2@@3GB) referenced in function "private: static unsigned short __cdecl caffe2::TypeMeta::_typeMetaData<class std::unique_ptr<class std::mutex,struct std::default_delete<class std::mutex> > >(void)" (??$_typeMetaData@V?$unique_ptr@Vmutex@std@@U?$default_delete@Vmutex@std@@@2@@std@@@TypeMeta@caffe2@@CAGXZ)
1>RASampleCharacter.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned short const caffe2::detail::std_unique_ptr_std_atomic_bool_metadata_index" (__imp_?std_unique_ptr_std_atomic_bool_metadata_index@detail@caffe2@@3GB) referenced in function "private: static unsigned short __cdecl caffe2::TypeMeta::_typeMetaData<class std::unique_ptr<struct std::atomic<bool>,struct std::default_delete<struct std::atomic<bool> > > >(void)" (??$_typeMetaData@V?$unique_ptr@U?$atomic@_N@std@@U?$default_delete@U?$atomic@_N@std@@@2@@std@@@TypeMeta@caffe2@@CAGXZ)
1>RASampleCharacter.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned short const caffe2::detail::std_vector_int32_t_metadata_index" (__imp_?std_vector_int32_t_metadata_index@detail@caffe2@@3GB) referenced in function "private: static unsigned short __cdecl caffe2::TypeMeta::_typeMetaData<class std::vector<int,class std::allocator<int> > >(void)" (??$_typeMetaData@V?$vector@HV?$allocator@H@std@@@std@@@TypeMeta@caffe2@@CAGXZ)
1>RASampleCharacter.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned short const caffe2::detail::std_vector_int64_t_metadata_index" (__imp_?std_vector_int64_t_metadata_index@detail@caffe2@@3GB) referenced in function "private: static unsigned short __cdecl caffe2::TypeMeta::_typeMetaData<class std::vector<__int64,class std::allocator<__int64> > >(void)" (??$_typeMetaData@V?$vector@_JV?$allocator@_J@std@@@std@@@TypeMeta@caffe2@@CAGXZ)
1>RASampleCharacter.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned short const caffe2::detail::std_vector_unsigned_long_metadata_index" (__imp_?std_vector_unsigned_long_metadata_index@detail@caffe2@@3GB) referenced in function "private: static unsigned short __cdecl caffe2::TypeMeta::_typeMetaData<class std::vector<unsigned long,class std::allocator<unsigned long> > >(void)" (??$_typeMetaData@V?$vector@KV?$allocator@K@std@@@std@@@TypeMeta@caffe2@@CAGXZ)
1>RASampleCharacter.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned short const caffe2::detail::bool_ptr_metadata_index" (__imp_?bool_ptr_metadata_index@detail@caffe2@@3GB) referenced in function "private: static unsigned short __cdecl caffe2::TypeMeta::_typeMetaData<bool *>(void)" (??$_typeMetaData@PEA_N@TypeMeta@caffe2@@CAGXZ)
1>RASampleCharacter.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned short const caffe2::detail::char_ptr_metadata_index" (__imp_?char_ptr_metadata_index@detail@caffe2@@3GB) referenced in function "private: static unsigned short __cdecl caffe2::TypeMeta::_typeMetaData<char *>(void)" (??$_typeMetaData@PEAD@TypeMeta@caffe2@@CAGXZ)
1>RASampleCharacter.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned short const caffe2::detail::int_ptr_metadata_index" (__imp_?int_ptr_metadata_index@detail@caffe2@@3GB) referenced in function "private: static unsigned short __cdecl caffe2::TypeMeta::_typeMetaData<int *>(void)" (??$_typeMetaData@PEAH@TypeMeta@caffe2@@CAGXZ)
1>RASampleCharacter.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned short const caffe2::detail::detail_guard_long_unique_long_metadata_index" (__imp_?detail_guard_long_unique_long_metadata_index@detail@caffe2@@3GB) referenced in function "private: static unsigned short __cdecl caffe2::TypeMeta::_typeMetaData<long>(void)" (??$_typeMetaData@J@TypeMeta@caffe2@@CAGXZ)
1>RASampleCharacter.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned short const caffe2::detail::detail_guard_long_unique_std_vector_long_metadata_index" (__imp_?detail_guard_long_unique_std_vector_long_metadata_index@detail@caffe2@@3GB) referenced in function "private: static unsigned short __cdecl caffe2::TypeMeta::_typeMetaData<class std::vector<long,class std::allocator<long> > >(void)" (??$_typeMetaData@V?$vector@JV?$allocator@J@std@@@std@@@TypeMeta@caffe2@@CAGXZ)
1>RASampleCharacter.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned short const caffe2::detail::float_ptr_metadata_index" (__imp_?float_ptr_metadata_index@detail@caffe2@@3GB) referenced in function "private: static unsigned short __cdecl caffe2::TypeMeta::_typeMetaData<float *>(void)" (??$_typeMetaData@PEAM@TypeMeta@caffe2@@CAGXZ)
1>RASampleCharacter.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned short const caffe2::detail::at_Half_metadata_index" (__imp_?at_Half_metadata_index@detail@caffe2@@3GB) referenced in function "private: static unsigned short __cdecl caffe2::TypeMeta::_typeMetaData<struct c10::Half *>(void)" (??$_typeMetaData@PEAUHalf@c10@@@TypeMeta@caffe2@@CAGXZ)
1>C:\UnrealProjects\RASample_5.3.2\Binaries\Win64\UnrealEditor-RASample.dll : fatal error LNK1120: 15 unresolved externals
1>Total time in Parallel executor: 0.76 seconds

The folder with the libtorch libs and dlls contains libs like torch, torch_cpu, c10 etc. No caffe2 lib. No lib that defines missing symbols. Missing symbols are not found by any search engine. Does anyone have an idea where to find missing symbols? How can I fix this issue?

0

There are 0 answers