From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14094 invoked by alias); 8 Jul 2008 20:16:19 -0000 Received: (qmail 14085 invoked by uid 22791); 8 Jul 2008 20:16:19 -0000 X-Spam-Check-By: sourceware.org Received: from smtp1.dnsmadeeasy.com (HELO smtp1.dnsmadeeasy.com) (205.234.170.144) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 08 Jul 2008 20:15:50 +0000 Received: from smtp1.dnsmadeeasy.com (localhost [127.0.0.1]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP id 5E0A231EFC5; Tue, 8 Jul 2008 20:16:02 +0000 (UTC) X-Authenticated-Name: js.dnsmadeeasy X-Transit-System: In case of SPAM please contact abuse@dnsmadeeasy.com Received: from avtrex.com (unknown [67.116.42.147]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP; Tue, 8 Jul 2008 20:16:02 +0000 (UTC) Received: from dl2.hq2.avtrex.com ([192.168.7.26]) by avtrex.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 8 Jul 2008 13:15:47 -0700 Message-ID: <4873CAF2.70406@avtrex.com> Date: Tue, 08 Jul 2008 20:36:00 -0000 From: David Daney User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: "J. M. Bogaard" Cc: gcc-help@gcc.gnu.org Subject: Re: gcj static link fails References: <4873C6E1.9070306@bogaard.eu> In-Reply-To: <4873C6E1.9070306@bogaard.eu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-07/txt/msg00104.txt.bz2 J. M. Bogaard wrote: > When i try to static link a app, compiled with gcj i get: > > /usr/bin/ld: cannot find -lgcj > collect2: ld returned 1 exit status > > I try to compile it with: gcj --main=HelloWorld -o HelloWorld > HelloWorld.java --static > > My OS is Debian Testing with GCJ 4.3. All relevant packages are installed. > > I hope somebody know a solution. > Do you have libgcj.a installed? Probably you will want to use -static-libgcj instead of --static. Also be forewarned that static linking with gcj is very tricky. You might want to read the Wiki: http://gcc.gnu.org/wiki/Statically_linking_libgcj David Daney