sreeharihegden opened a new issue, #35239: URL: https://github.com/apache/arrow/issues/35239
### Describe the enhancement requested As discussed in [this comment thread](https://github.com/apache/arrow/pull/34563#discussion_r1167214786), when building the Arrow C++ libraries in `Debug` mode on Windows using Visual Studio, the resulting `arrow.dll` file will be linked against a [`MultiThreadedDebugDLL` (i.e. `/MDd`) version](https://cmake.org/cmake/help/latest/prop_tgt/MSVC_RUNTIME_LIBRARY.html) of the [MSVC Runtime libraries](https://learn.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features) (e.g. `VCRUNTIME140D.dll` - note the **D** for **D**ebug in the DLL name). This can lead to unexpected behavior (e.g. crashes, memory corruptions, etc.) when linking `arrow.dll` against other code that is built against a different MSVC Runtime (e.g. a non-`Debug` version). We ran into this issue when [developing the MATLAB interface](https://github.com/apache/arrow/pull/34563#discussion_r1160962568) and linking a `Debug` build of `arrow.dll` against a [MATLAB MEX function](https://www.mathworks.com/help/matlab/call-mex-functions.html) (which is linked against a non-`Debug` MSVC Runtime by default). Hence, as @kou suggested [here](https://github.com/apache/arrow/pull/34563#discussion_r1167280545), when building the MATLAB Interface to Arrow in `Debug` mode on Windows, it might be good to report an error such as `"You can't build this with Debug because MATLAB is built with Release. You must use Release"`. ### Component(s) MATLAB -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
