EiffelStudio 6.1 and MinGW on Windows

by Manu (modified: 2007 Jul 19)

This week we added a new backend C compiler for EiffelStudio. We chose MinGW (gcc based) as it is made to target Windows and its Win32 API. Surprisingly, it was fairly easy to do. Indeed we have tried to do this in the past but without too much success.

In 1996, we tried but quickly failed because the Windows API support was really not ready. In 1999, it got better and we did some ground work to make our tools support gcc. But unfortunately they were some limitations in the toolchain and it would not compile large application (as they often say in this case it was a limitation in the binutils, see the Cygwin mailing list archive). Regardless of this, some of the issues we had were:

  • Directory separator convention: / instead of \
  • The difference between .lib/.obj and .o/.a, and more precisely the correct usage of ar rc vs. ld -r -o.
  • Ordering of libraries for linking.

In 2002, we tested it again with gcc coming from the cygwin distribution. It worked great but not for compiling Windows application. We simply used cygwin as if we were on a Unix platform and compiled everything as on Unix. The command line compiler was up and running but no way to generate a graphical application unless using GTK.

We choose MinGW because they have started to do a 64-bit version and once we have the 32-bit version up and running it should be straightforward to support 64-bit. We are unsure when the 64-bit version will be available, but the 32-bit version will be a very good replacement for the Borland C compiler which is starting to get a little bit too old. Like Borland, MinGW does not require any user configuration, it will be properly configured at install time.

The result today is that we have compiled the default Vision2 application out of the box. The good news is that what we have done could work with 6.0 as long as you copy the necessary files over, but the target is the next release of EiffelStudio in November.

Anyone interested in testing this should wait the first intermediate release of 6.1 in the next couple of weeks.

  • Colin Adams (10 years ago 19/7/2007)


    Have you had a chance to see how finialized applications compare for performance wrt Borland and Microsoft back ends? Colin Adams

    • Manu (10 years ago 20/7/2007)


      We are in the early stage for MinGW so I can't tell. The generated code for Microsoft is usually better than the one from Borland because their Free version does not offer what their paying version used to in terms of optimizations.

  • Bernd Schoeller (10 years ago 20/7/2007)

    Looking forward ...

    Great, I will definitely be an alpha-tester, I disliked the need for a VC installation under Windows anyway.

    Now of course the question is: will we be able to bootstrap EiffelStudio on Windows using MinGW? ;-)

    • Manu (10 years ago 20/7/2007)


      We certainly hope so.

  • Patrick Ruckstuhl (9 years ago 23/7/2007)

    I'm looking forward to this as well and will test it as well.