diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 837ed7d7c..0e04accec 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -26,5 +26,5 @@ find_package(iceberg CONFIG REQUIRED) add_executable(demo_example demo_example.cc) -target_link_libraries(demo_example PRIVATE iceberg::iceberg_bundle_static - iceberg::iceberg_rest_static) +target_link_libraries(demo_example PRIVATE iceberg::iceberg_bundle_shared + iceberg::iceberg_rest_shared) diff --git a/src/iceberg/CMakeLists.txt b/src/iceberg/CMakeLists.txt index 603c35343..62882d587 100644 --- a/src/iceberg/CMakeLists.txt +++ b/src/iceberg/CMakeLists.txt @@ -132,13 +132,13 @@ set(ICEBERG_SHARED_INSTALL_INTERFACE_LIBS) list(APPEND ICEBERG_STATIC_BUILD_INTERFACE_LIBS - nanoarrow::nanoarrow_static + "$,nanoarrow::nanoarrow_static,$,nanoarrow::nanoarrow_static,nanoarrow::nanoarrow_shared>>" nlohmann_json::nlohmann_json roaring::roaring ZLIB::ZLIB) list(APPEND ICEBERG_SHARED_BUILD_INTERFACE_LIBS - nanoarrow::nanoarrow_shared + "$,nanoarrow::nanoarrow_static,$,nanoarrow::nanoarrow_shared,nanoarrow::nanoarrow_static>>" nlohmann_json::nlohmann_json roaring::roaring ZLIB::ZLIB) @@ -149,7 +149,7 @@ list(APPEND "$,iceberg::roaring,roaring::roaring>") list(APPEND ICEBERG_SHARED_INSTALL_INTERFACE_LIBS - "$,iceberg::nanoarrow_shared,$,nanoarrow::nanoarrow_shared,nanoarrow::nanoarrow_static>>" + "$,iceberg::nanoarrow_static,$,nanoarrow::nanoarrow_shared,nanoarrow::nanoarrow_static>>" "$,iceberg::nlohmann_json,$,nlohmann_json::nlohmann_json,nlohmann_json::nlohmann_json>>" "$,iceberg::roaring,roaring::roaring>") diff --git a/src/iceberg/iceberg_export.h b/src/iceberg/iceberg_export.h index 8d7a35f27..2463fbeaf 100644 --- a/src/iceberg/iceberg_export.h +++ b/src/iceberg/iceberg_export.h @@ -53,5 +53,5 @@ # define ICEBERG_TEMPLATE_EXPORT # define ICEBERG_TEMPLATE_CLASS_EXPORT ICEBERG_EXPORT -# define ICEBERG_EXTERN_TEMPLATE_CLASS_EXPORT ICEBERG_TEMPLATE_EXPORT +# define ICEBERG_EXTERN_TEMPLATE_CLASS_EXPORT ICEBERG_TEMPLATE_CLASS_EXPORT #endif diff --git a/src/iceberg/table_scan.cc b/src/iceberg/table_scan.cc index 2195482bb..f61bd3a0c 100644 --- a/src/iceberg/table_scan.cc +++ b/src/iceberg/table_scan.cc @@ -535,9 +535,9 @@ Result> TableScanBuilder::Build() { } // Explicit template instantiations -template class TableScanBuilder; -template class TableScanBuilder; -template class TableScanBuilder; +template class ICEBERG_TEMPLATE_EXPORT TableScanBuilder; +template class ICEBERG_TEMPLATE_EXPORT TableScanBuilder; +template class ICEBERG_TEMPLATE_EXPORT TableScanBuilder; TableScan::TableScan(std::shared_ptr metadata, std::shared_ptr schema, std::shared_ptr file_io, diff --git a/src/iceberg/table_scan.h b/src/iceberg/table_scan.h index 064825d82..307946e6c 100644 --- a/src/iceberg/table_scan.h +++ b/src/iceberg/table_scan.h @@ -28,6 +28,7 @@ #include #include "iceberg/arrow_c_data.h" +#include "iceberg/iceberg_export.h" #include "iceberg/result.h" #include "iceberg/table_metadata.h" #include "iceberg/type_fwd.h" @@ -252,7 +253,7 @@ concept IsIncrementalScan = std::is_base_of_v, T> /// \brief Builder class for creating TableScan instances. template -class ICEBERG_EXPORT TableScanBuilder : public ErrorCollector { +class ICEBERG_TEMPLATE_CLASS_EXPORT TableScanBuilder : public ErrorCollector { public: /// \brief Constructs a TableScanBuilder for the given table. /// \param metadata Current table metadata. @@ -524,4 +525,11 @@ class ICEBERG_EXPORT IncrementalChangelogScan using IncrementalScan::IncrementalScan; }; +extern template class ICEBERG_EXTERN_TEMPLATE_CLASS_EXPORT + TableScanBuilder; +extern template class ICEBERG_EXTERN_TEMPLATE_CLASS_EXPORT + TableScanBuilder; +extern template class ICEBERG_EXTERN_TEMPLATE_CLASS_EXPORT + TableScanBuilder; + } // namespace iceberg