Building Win32::API with MinGW

bart on 2006-12-07T19:34:41

Earlier today we were chatting about Win32::API on Perlmonks, about building it with other compilers than the standard Microsoft Visual C, and one user claimed that he had succesfully built Win32::API using Cygwin. Later he sent me a msg saying he had made a mistake and it wasn't Win32::API at all, but anyway my curiousity had been woken. I saw that Cosimo, who already had "threatened" taken over mainainance for the module, had already been active, and it looked to me like it might just work — it used to be written so it could only compile on Microsoft's compiler, thanks to some nonporatble embedded assembler routines — and it has been like this for years. So I just had to try it. I've tried to build it both with ActivePerl+MinGW, and with PXPerl, which is a (now abandoned) standalone perl port to Win32, which also uses MinGW. The good news: it builds on both. It's also supposed to build with Borland, judging by the source code. But still, make test barfs with a mysterious error message, that it can't find cl.exe — the command line compiler from MS Visual C. WTF...? The solution to this little mystery is in the test subproject API_test_dll, that contains a prebuild Makefile that explicitely and only works with cl.exe. Dammit. If any of you C bufs, who may be inclined to help Cosimo out, could port this so it builds with other compilers too, I'm sure it would be greatly appreciated. I'm going to try my hand at it, for MinGW, sometime later today or this week, if none of you people beat me to it.

update: I had just finished and posted this journal entry when I noticed that Cosimo had written one himself about this subject, earlier today. Whoops.