Thanks for those updates! I hadn’t managed to get the MSVC DLL to work. It’s good that it should, and I’m glad to hear the compilers use a compatible ABI for DLL files. This is less true under Linux.
I did try Alien::ZMQ, but it failed to compile zmq. I admit I didn’t dig further into those errors, and just started down the path of building my own.
I posted this blog to make sure that there was more search engine fodder to help people find this technique of using MSYS2, as it would be applicable to many things, not just ZMQ. ZMQ is just the thing I was fighting this week. :) I really appreciate that you took the time to reply with more details about ZMQ, and provided those links!
]]>There are 2 more ways this can be done:
1. Use the .dll from vcpkg:
This works because ZMQ has a C API which can be accessed via FFI despite vcpkg building via MSVC (the ABI for C works across compilers).
1. Use Alien::ZMQ::latest which downloads and builds ZMQ with the Strawberry Perl toolchain:
The latest release of ZMQ::FFI has support for loading from Alien::ZMQ::latest if it is installed.
]]>