template DISKANN_DLLEXPORT class Index;
< /code>
Building the diskann_cc target produces libdiskann.lo
и libdiskann.so . Используя команду nm , я вижу, что Diskann :: index :: Build является неопределенным символом (u) в этих файлах.
U diskann::Index::build(float const*, unsigned long, diskann::parameters const&, std::vector const&, bool)
< /code>
When I inspect the .lo file from diskann_impl, nm shows that this same symbol is a weak symbol (W).
00000000004e4424 W diskann::Index::build(float const*, unsigned long, diskann::parameters const&, std::vector const&, bool)
< /code>
How can I resolve the undefined symbol problem?
У меня есть проект Bazel с двумя библиотеками, низкоуровневой библиотекой Core_impl и более высоким уровнем warpper_lib . Вот их файлы сборки : [code]load("//bazel:bundle.bzl", "bundle_cc_hdrs", "bundle_files") load("@rules_foreign_cc//tools/build_defs:cmake.bzl", "cmake_external")
cc_binary( name = "libknn_diskann.so", deps = [ ":diskann_cc", "//path/to/diskann_impl:diskann_impl", ], linkshared = True, visibility = ["//visibility:public"], ) < /code> Template class diskann::Index[/code] явно определено в index.cpp of diskann_impl библиотека. [code]template DISKANN_DLLEXPORT class Index; < /code> Building the diskann_cc target produces libdiskann.lo[/code] и libdiskann.so . Используя команду nm , я вижу, что Diskann :: index :: Build является неопределенным символом (u) в этих файлах. U diskann::Index::build(float const*, unsigned long, diskann::parameters const&, std::vector const&, bool) < /code> When I inspect the .lo file from diskann_impl, nm shows that this same symbol is a weak symbol (W). 00000000004e4424 W diskann::Index::build(float const*, unsigned long, diskann::parameters const&, std::vector const&, bool) < /code> How can I resolve the undefined symbol problem?