[Bonmin] Building Bonmin as a dll with MinGW - success!

Tony Kelman kelman at berkeley.edu
Thu Oct 31 01:49:06 EDT 2013


A few people have asked about building Bonmin or other COIN-OR projects as Windows dll’s using MinGW compilers and running the standard configure scripts in MSYS. Shared libraries are currently disabled by BuildTools configure when using MinGW compilers, but I’ve been looking into how much would need to change to make it possible. I’m happy to report I’ve succeeded, and anyone interested can have a look at what I needed to do (and try to reproduce my steps) in this shell script: https://gist.github.com/7244436

This builds and passes all unit tests using TDM-GCC MinGW-64, and all but one on standard 32-bit MinGW. There’s a failed assertion during Cgl’s unit tests on 32-bit in CglZeroHalf that I may want to look into in more detail. I can post the binaries for people to try out if there’s interest.

I needed to make a few little changes to configure scripts and some of the Makefiles, and configure and link with several additional flags. The most important difference is that Windows dll’s do not allow undefined references, so the dependencies have to be explicitly specified and built in a specific order. The baseline Makefiles from configure don’t include all of this information or respect the dependency ordering as strictly as they would need to for this to be further automated.

I’d be happy to discuss with Stefan or others how the build system could be improved to make this process simpler. Improved handling of dependencies has been requested on other platforms as well, for example in https://projects.coin-or.org/BuildTools/ticket/105.

-Tony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/bonmin/attachments/20131030/cf7a5aca/attachment.html>


More information about the Bonmin mailing list