Hacker News new | ask | show | jobs
by jcoffland 3572 days ago
Recently I've started compiling more of my code for Windows using Mingw (or clang). Performance is very good and you can build in Linux for Windows inside a Docker container. You can even build Windows installers using NSIS. I've also tried to do this for OSX but with less success.
1 comments

Cap'n Proto supports MinGW as a target platform. (It has also supported Cygwin since very early on.) However, Cap'n Proto is a library, so it needs to support whatever compiler the users of that library are using, and for the vast majority of Windows developers that's MSVC.
Right, but you should be able to compile a library with either MinGW or clang from Linux that your users can use with MSVC.
Not if it uses C++. MinGW uses the G++ ABI which is totally incompatible with the MSVC ABI.

(Also, a lot of the issues we face affect headers, which need to be compiled into the client projects.)

Since the code is so small and in C++ why not make it a header only library?