diff --git a/include/eigenpy/numpy.hpp b/include/eigenpy/numpy.hpp
index fec71be8637a0bc1e266d4bcc55151dddb89be3e..6cac2d0e24b34cede67246778100462970cfe322 100644
--- a/include/eigenpy/numpy.hpp
+++ b/include/eigenpy/numpy.hpp
@@ -13,7 +13,7 @@
 
 // For compatibility with Numpy 2.x. See:
 // https://numpy.org/devdocs/reference/c-api/array.html#c.NPY_API_SYMBOL_ATTRIBUTE
-#define NPY_API_SYMBOL_ATTRIBUTE
+#define NPY_API_SYMBOL_ATTRIBUTE EIGENPY_DLLAPI
 
 // Numpy headers drags Python with them. As a result, it
 // is necessary to include the desired Python library before