From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1710 invoked by alias); 26 Apr 2002 10:00:56 -0000 Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org Received: (qmail 1684 invoked from network); 26 Apr 2002 10:00:51 -0000 Received: from unknown (HELO localhost.localdomain) (210.86.60.59) by sources.redhat.com with SMTP; 26 Apr 2002 10:00:51 -0000 Received: from waitaki.otago.ac.nz (hokkaido.erehwon.co.nz [192.168.1.53]) by localhost.localdomain (8.11.2/8.11.2) with ESMTP id g3Q9xaT09201; Fri, 26 Apr 2002 21:59:38 +1200 Message-ID: <3CC925E4.1060900@waitaki.otago.ac.nz> Date: Fri, 26 Apr 2002 03:43:00 -0000 From: Bryce McKinlay User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0rc1) Gecko/20020417 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ryszard.Kabatek@softax.pl CC: java@gcc.gnu.org Subject: Re: Problem with AClass.class References: <3CC8FD55.CA9FA287@softax.pl> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00367.txt.bz2 Ryszard Kabatek wrote: >gcj (gcc version 3.1 20020325 (prerelease)) on linux > >I got a linking error because of using the class member function: >AClass.class.getName() > >/tmp/cc3aa1t7.o: In function `main': >/tmp/cc3aa1t7.o(.text+0x1d): undefined reference to `AClass::class$' >collect2: ld returned 1 exit status > >What is wrong? > Given that the undefined reference is in "main", it seems like you specified an incorrect --main class, or forgot to link in AClass? regards Bryce.