CygWin x Win32

Subject: CygWin x Win32
From: Hisham Muhammad (
Date: Thu May 18 2000 - 11:15:33 CDT

Hello folks at AbiWord-dev,

For the last days I've been working on building AbiWord on CygWin, to get a
Win32 build (I built the BeOS version with no problems). I soon found out
that the CygWin build is based on the "unix" tree, using the Win32 port of
GTK... I felt it was against AbiWord's XP development philosophy, that it
should "feel native" on every port, so I went on to make a "win" build using
the CygWin tools which I had just downloaded (no, I don't have MSVC here).
No, I didn't succeed yet, but I think I'm close.

I'm not very skilled on C++ (I come from Pascal and other less-known
languages) and I had a hard time especially when dealing with the Makefiles.

My first step was to create an option at called
ABI_OPT_CYGWIN_NATIVE (as opposed to ABI_OPT_CYGWIN_UNIX). I also created a file which was a 'mix' of and .

Then I basically modified all Makefiles from "win" directories, kind of
mixing the "unix" and "win" Makefiles (always using "ifdef
ABI_OPT_CYGWIN_NATIVE", hoping not to break the Win32/MSVC build).

During the compilation, it complained on some include files, which were
incomplete or missing from the CygWin installation: commctrl.h (incomplete),
zmouse.h and crtdbg.h (missing -- thanks Bob). Getting them from MSVC solved

As expected, since GCC is known as a much more strict compiler than VC's, I
had some compilation errors on some casts missing. A friend told me to use
"const_cast" (which I didn't even know that existed) and that fixed the

Other problem I faced was when includes were needed from other directories
(I told you I don't know a thing about Makefiles!)... my quick and dirty
solution was to copy the includes to the directories, yeah I know it's
stupid, but worked. Two other include problems which from I suspect can be
solved in the Makefiles were: 1) I had to put #include <malloc.h> in many
files (and one ctype.h too, IIRC), and 2) _stat didn't compile, stat did (I
don't have a clue what this is, I know I was lazy but changing it was easier
than finding out).

The final (yet unsolved) problem is on the Makefiles that actually build the
EXE's. The one from 'cdump', I lost my patience, went to the obj directory
and "gcc'd" it by hand. 'askrm' and 'ask_gendata', I got to make them work.
But 'abiword.exe' didn't build. I tried different ways but couldn't figure
that 'last' Makefile out.

So, here I am, many many make's later, with 253 .o's and 18 .a's on my
CYGWIN_NATIVE_4.0_i386_OBJ directory, and no build yet. :) I'd like to know
if someone would like to help me out or carry on from here on this, I'm sure
it's just a bunch of basic mistakes that are preventing it from working...
I'll be deleting my Windows partition, as I'm abandoning dual-boot and
switching to Linux (still keeping the BeOS 500MB image for fun), actually
the only thing holding me to Windows now is this "Cygwin_Native" project.
Still, having a native Win32 build made out of free tools seems to be a
valid effort.

Hisham H. Muhammad

This archive was generated by hypermail 2b25 : Thu May 18 2000 - 11:19:12 CDT