This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: GCJ Error: undefined reference to `InterlockedIncrement@4'


Thanks everyone, I got gcj to work.

I downloaded the new libkernel32.a and libgcj.spec today (2/9/2000) from Jon
Beniston's web page on libgcj  (http://www.cs.bris.ac.uk/~jb7216/libgcj/).

I copied libkernel32.a to /cygnus/cygwin-b20/lib and libgcj.spec to
/usr/local/lib and now everything works.

Micron

-----Original Message-----
From: Mumit Khan [mailto:khan@NanoTech.Wisc.EDU]
Sent: Wednesday, February 09, 2000 10:33 AM
To: Gust, Micron
Cc: Cygwin@Sourceware.Cygnus.Com; jb7216@bristol.ac.uk
Subject: Re: GCJ Error: undefined reference to `InterlockedIncrement@4' 


"Gust, Micron" <MGust@RFC.com> writes:
> I am having problems getting a very simple "Hello World" java class to
> compile with gcj.
> 
> When I try to compile the class file it gives me the error message below.
> I've also tried compiling the .java file and I got the same error. Can
> anyone tell me what I'm doing wrong? 
> 
> FYI: I have installed:
> 1) The full version of Cygwin B20.1
> 2) GCC version 2.95.2 for Cygwin B20.x
> 3) Libgcj for Win32
> 
> Error Messages:
>
----------------------------------------------------------------------------
> -----------------
> bash-2.02$ gcj -mno-cygwin --main=Hello -o Hello Hello.class
> /usr/local/lib/libgccgcj.a(_eh.o): In function `eh_context_initialize':
>
/usr/local/build/gcc-2.95.2/gcc/../../../src/gcc-2.95.2/gcc/libgcc2.c(.text+
> 0x142): undefined reference to `InterlockedIncrement@4'
> /usr/local/lib/libgccgcj.a(frame.o): In function `init_object_mutex_once':
>
/usr/local/build/gcc-2.95.2/gcc/../../../src/gcc-2.95.2/gcc/frame.c(.text+0x
> 4a): undefined reference to `InterlockedIncrement@4'
> collect2: ld returned 1 exit status
>
----------------------------------------------------------------------------

Looks like the gcj specs is incorrect, and not linking in libkernel32.a
which contains the missing symbol.

Make sure you read up on Jon Beniston's web page on libgcj:

   Linkname: Libgcj for Win32
   URL: http://www.cs.bris.ac.uk/~jb7216/libgcj/

He mentions some problems with the specs, and possibly also with 
libkernel32.a, and provides an alternative/fixed one.

Jon, can you elaborate on the problem with libkernel32.a so I can
fix it? Note that there is no GetFileAttributeEx exported by the
kernel interface, but rather GetFileAttributeEx{A,W} for ASCII
and Unicode. 

Regards,
Mumit

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]