adamreeve commented on issue #41134: URL: https://github.com/apache/arrow/issues/41134#issuecomment-2097246510
I had a look into this and from what I can tell, gobject-introspection is only needed if building the Vala bindings, which I didn't test, but the GLib in vcpkg seems to work. There are some minor code changes needed to get the c_glib code compiling with MSVC, but the big problem I ran into is that MSVC does not export any symbols by default, so the dll fails to build. The problem is the same as what was reported in https://github.com/mesonbuild/meson/issues/8716. There's a Meson issue for allowing all symbols to be exported (https://github.com/mesonbuild/meson/issues/2132) and this functionality exists in CMake, but unless that is added it looks like we either need to create a `.def` file with all of the symbols to export, or add `__declspec(dllexport)`/`__declspec(dllimport)` attributes to all of the methods that need to be exported. It seems like extending the `GARROW_AVAILABLE_IN_*` macros to add these might make sense, although there is also a need to add these attributes to some of the methods in the `.hpp` header files too, which aren't part of the GLib APIs but are used for sharing code across the different GLib library implementations. I have managed to build the arrow-glib library with MSVC and get the tests from #37544 passing with some hackily put together changes (https://github.com/apache/arrow/compare/main...adamreeve:arrow:windows_glib). If this general approach looks reasonable I could tidy this up and make a PR? -- 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]
