Win32 Build Issues

Subject: Win32 Build Issues
From: David Mandelin (
Date: Tue Aug 07 2001 - 11:14:32 CDT

I got the latest sources from CVS yesterday, and 5 hours of agony later,
I have "abiword.exe". I am using VC++ 6 on Win2k pro. Assuming that the
problem is not my error, I should be able to prepare some patches.

Would someone mind answering a few questions on the patching protocol?
Is it good to toss out a plan and some questions, as below, or better
just to submit code and fix it when the maintainers don't like it? And
how would I prepare a patch? Just CVS diff?

As I mentioned above, I typed up my findings:

1. A compile error in one of the Abiword .cpp files (sorry, forgot the
name, can find it later, I can't connect to right now).
The problem is that by in MSVC, by default, in this code:

        for (int i;;) {

        int i;

MSVC gives the loop var i the scope of the outer block instead of the
for loop, so it gives an error for i being multiply defined.

To fix this, we could (a) rename one of the vars, (b) remove one of the
definitions, or (c) turn off MS language extensions in the compiler (/Za
option). Doing 'c' causes problems in some other file, because MSVC
won't cast an enumeration value to a (void *) unless MS extensions are
on. I couldn't fine a way to selectively enable exensions. Whaddya want?

2. libiconv didn't compile correctly at all. The file
"libiconv/Makefile.abi" compiles just the file "libiconv/src/iconv.c".
The library is contained in "libiconv/lib". I was able to compile it
using "nmake -f Makefile.msvc" in the libiconv dir. I'm not too sure
what to do about this.

3. But the linker puked on the correctly compiled libiconv anyway.
AbiWord is linked without libc, but libiconv uses errno. I just stuck
"int errno" in iconv.c, but that seems kludgy.

4. And after that, the linker wouldn't link wv, because wv was trying to
access the iconv functions as "iconv_open", etc, when my libiconv had
them as "libiconv_open", etc. Looking at the makefile for wv I found
that it was using "wv/iconv/iconv.h" for that include file, which
appeared to be a distro of iconv contained in wv. Switching the include
path entry from "./iconv" to "../libiconv/lib" did the trick.

This archive was generated by hypermail 2b25 : Tue Aug 07 2001 - 11:14:31 CDT