From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32421 invoked by alias); 27 Apr 2004 15:24:01 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 32400 invoked from network); 27 Apr 2004 15:24:00 -0000 Received: from unknown (HELO zdemail03.zdem.compaq.com) (161.114.112.27) by sources.redhat.com with SMTP; 27 Apr 2004 15:24:00 -0000 Received: from bbnexg11.emea.cpqcorp.net (bbnexg11.emea.cpqcorp.net [16.57.5.20]) by zdemail03.zdem.compaq.com (Postfix) with ESMTP id 1A0C910EE for ; Tue, 27 Apr 2004 17:23:56 +0200 (CEST) Received: from bbnexc02.emea.cpqcorp.net ([16.57.5.27]) by bbnexg11.emea.cpqcorp.net with Microsoft SMTPSVC(6.0.3790.0); Tue, 27 Apr 2004 17:23:55 +0200 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: gcj Date: Tue, 27 Apr 2004 15:24:00 -0000 Message-ID: <242175EA3C8D3045B8D77EE70A063DB50295F211@bbnexc02.emea.cpqcorp.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Plapp, Phillip" To: X-OriginalArrivalTime: 27 Apr 2004 15:23:55.0691 (UTC) FILETIME=[A785E7B0:01C42C6B] X-SW-Source: 2004-04/txt/msg00368.txt.bz2 Hello GNU guys, I have a question concerning GCJ, CNI and nested java classes. The following is my java class scenario in which class A contains an instance of a nested class B: Class A { B b; Class B { int getSize(); } } In my CNI style C++ file, I have the following code that attempts to access b->getSize() through a, which is an instance of A #include // line number 3 A$B *tmp =3D (A$B*)a.getB; // line number 180 jint size =3D tmp->getSize(); // line number 181 When I compile with gcj, I get the following error: Test.cpp:181: error: invalid use of undefined type 'A$B' As you can see, the compiler didn't have a problem with line 180 where I got the instance b of class B. The problem=20 came when I tried to use the instance of b. I assume this is because there is no A$B header file. I tried to produce the=20 A$B.h file, but gcjh only produced the A.h file even when I ran=20 gcjh A$B. Any ideas? You guys make good stuff! Thanks! Phil =20=20