Return-Path: <belmonte@MIT.EDU>
Received: from pacific-carrier-annex.mit.edu by po11.mit.edu (8.9.2/4.7) id CAA08140; Fri, 8 Feb 2002 02:53:11 -0500 (EST)
Received: from mattababy.mit.edu (SPRING-STEEL.MIT.EDU [18.54.0.47])
	by pacific-carrier-annex.mit.edu (8.9.2/8.9.2) with ESMTP id CAA20945
	for <sipb@mit.edu>; Fri, 8 Feb 2002 02:52:52 -0500 (EST)
Received: (from root@localhost)
	by mattababy.mit.edu (8.9.1/8.8.8-ajr) id CAA15868;
	Fri, 8 Feb 2002 02:53:15 -0500 (EST)
Date: Fri, 8 Feb 2002 02:53:15 -0500 (EST)
Message-Id: <200202080753.CAA15868@mattababy.mit.edu>
From: belmonte@MIT.EDU (Matthew Belmonte)
To: tbogner@draper.com (Tony Bogner)
Subject: Re: problem c++ files
Reply-To: sipb@MIT.EDU

The problem is exactly what the error message is saying: line 4 of test.cpp
includes ut_iconv.h, which in turn includes (on line 26) /usr/include/iconv.h.
Line 16 of /usr/include/iconv.h defines the new type iconv_t as a pointer to
something called a struct _iconv_info, which has not yet been defined.  This is
enough information for the compiler to figure out that something of type
iconv_t must be a pointer, and must therefore occupy the number of bytes that a
pointer does.  It is not enough information, however, for the compiler to
figure out how much memory is taken up by the structure to which an instance of
iconv_t points.  So, everything goes along fine till the compiler hits line 54
of ut_iconv.h, which invokes the preprocessor macro UT_THROWS((iconv_t)), which
expands to "throw iconv_t".  In order to generate code to throw this exception,
the compiler needs to know how big that structure is.  It doesn't have that
information, though, so it spits out an error message and gives up.

Now, as to what may be causing this behaviour - in the package that you're
building, do you have a libiconv or perhaps a libcharset subdirectory?  If so,
is there a configure script that needs to be run within that directory in order
to generate the appropriate definitions in .h files?

Whatever the specific nature of the problem, either struct _iconv_info needs to
be defined, or the reference to it needs to be removed.  As a last resort, you
might try downloading libiconv from http://www.gnu.org/software/libiconv/
and looking through the source code to see where the appropriate definition
occurs.
