kou commented on code in PR #2740:
URL: https://github.com/apache/arrow-adbc/pull/2740#discussion_r2062606705


##########
c/include/arrow-adbc/adbc.h:
##########
@@ -152,15 +152,19 @@ struct ArrowArrayStream {
 // Storage class macros for Windows
 // Allow overriding/aliasing with application-defined macros
 #if !defined(ADBC_EXPORT)
-#if defined(_WIN32)
+#if (defined(_WIN32) || defined(__CYGWIN__)) && defined(ADBC_BUILD_DLL)

Review Comment:
   `ADBC_BUILD_DLL` is needed because we can't use 
`__declspec(dll{import,export})` entirely for static linking.
   
   FYI: Apache Arrow C++ uses `ARROW_STATIC` not `ADBC_BUILD_DLL`: 
https://github.com/apache/arrow/blob/6e84d990379a0fe20a0a89311aa864f40efded23/cpp/src/arrow/util/visibility.h#L42
   
   It's specified when static linking not shared linking.
   
   I think that specifying additional macro for building static linking 
(`ARROW_STATIC`) approach is easier to use than specifying additional macro for 
building shared library (`ADBC_BUILD_DLL`). Because we can add additional 
cflags with `.pc` by `Cflags.private`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to