| www.delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Reply-To: | <mzallocc AT nc DOT rr DOT com> |
| From: | "mauro zallocco" <mzallocc AT nc DOT rr DOT com> |
| To: | "'Tim Prince'" <tprince AT computer DOT org>, <cygwin AT cygwin DOT com> |
| Subject: | RE: Java hello world link error |
| Date: | Sun, 21 Dec 2003 11:02:15 -0500 |
| Message-ID: | <000001c3c7db$cdde77a0$6664a8c0@cipheroptics.com> |
| MIME-Version: | 1.0 |
| In-reply-to: | <6.0.1.1.0.20031221073651.01f06d28@imap.myrealbox.com> |
| X-Virus-Scanned: | Symantec AntiVirus Scan Engine |
| Note-from-DJ: | This may be spam |
Thank you for the suggestion.
Here is what I get.
$ gcj Test.java
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../../i686-pc-cygwin/bin/ld:
cannot
find -liconv
collect2: ld returned 1 exit status
Mauro
> -----Original Message-----
> From: Tim Prince [mailto:tprince AT computer DOT org]
> Sent: Sunday, December 21, 2003 10:39 AM
> To: mzallocc AT nc DOT rr DOT com; cygwin AT cygwin DOT com
> Subject: Re: Java hello world link error
>
>
> At 08:04 PM 12/20/2003, mauro zallocco wrote:
>
> >Folks,
> >
> >I installed gcc-java on Windows XP, and am attempting to compile:
> >
> >class Test {
> > public static void main(String argv[]) {
> > System.out.println("Hello World");
> > }
> >}
> >
> >with the following command:
> >g++ Test.java
> >
> >This produces a gazillion link errors, a sample follows:
> >/cygdrive/c/DOCUME~1/mzallocc/LOCALS~1/Temp/ccywNFar.o(.text+
> 0x2d):Test.java
> >: undefined reference to `__Jv_InitClass'
> >/cygdrive/c/DOCUME~1/mzallocc/LOCALS~1/Temp/ccywNFar.o(.text+
> 0x37):Test.java
> >: undefined reference to `java::lang::System::out'
> >/cygdrive/c/DOCUME~1/mzallocc/LOCALS~1/Temp/ccywNFar.o(.text+
> 0x5f):Test.java
> >: undefined reference to `java::lang::Object::Object[in-charge]()'
> >/cygdrive/c/DOCUME~1/mzallocc/LOCALS~1/Temp/ccywNFar.o(.text+
> 0xc8):Test.java
> >: undefined reference to `__Jv_RegisterClass'
> >
> >
>
> Why not start out by linking it as a java program, with gcj,
> rather than as
> C++ ?
>
> Tim Prince
>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |