From 1ecbe922f4569e029075f654b069db0564d24f49 Mon Sep 17 00:00:00 2001 From: Ivan K Date: Mon, 19 Jan 2026 21:23:25 +0300 Subject: [PATCH] Only export R_init_data_table This will avoid name clashes between data.table functions (now hidden) and other functions in the global namespace visible to the shared library loader. Fixes: #7605 --- src/Makevars.in | 4 ++-- src/data.table-win.def | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 src/data.table-win.def diff --git a/src/Makevars.in b/src/Makevars.in index fcfaceba99..8cf8db729c 100644 --- a/src/Makevars.in +++ b/src/Makevars.in @@ -1,5 +1,5 @@ -PKG_CFLAGS = @PKG_CFLAGS@ @openmp_cflags@ @zlib_cflags@ -PKG_LIBS = @PKG_LIBS@ @openmp_cflags@ @zlib_libs@ +PKG_CFLAGS = $(C_VISIBILITY) @PKG_CFLAGS@ @openmp_cflags@ @zlib_cflags@ +PKG_LIBS = $(C_VISIBILITY) @PKG_LIBS@ @openmp_cflags@ @zlib_libs@ # See WRE $1.2.1.1. But retain user supplied PKG_* too, #4664. # WRE states ($1.6) that += isn't portable and that we aren't allowed to use it. # Otherwise we could use the much simpler PKG_LIBS += @openmp_cflags@ -lz. diff --git a/src/data.table-win.def b/src/data.table-win.def new file mode 100644 index 0000000000..db64187670 --- /dev/null +++ b/src/data.table-win.def @@ -0,0 +1,3 @@ +LIBRARY data.table.dll +EXPORTS + R_init_data_table