delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/05/23/09:58:04

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <200654B4597FD411A69D00508BA5415B59C627@CORPMAIL02>
From: "Puttkammer, Roman" <roman DOT puttkammer AT multex DOT com>
To: "'Miroslav Koncar'" <miroslav DOT koncar AT etk DOT ericsson DOT se>, cygwin AT cygwin DOT com
Subject: RE: DLL for Java Native Interface
Date: Wed, 23 May 2001 09:55:01 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)

I've succesfully used JNI with gcc. However I did not use cygwin's gcc
but mingw32. Check out http://www.xraylith.wisc.edu/~khan/software/gnu-win32
for more details.

I found some instructions somewhere on how to create DLLs (involves using
dlltool and dllwrap.) Sorry, but I have no clue where I found that. At the
end,
it did work perfectly though!

I wouldn't know of any reason why this shouldn't work with cygwin gcc as
well
Maybe someone can provide you some hints on how to create a DLL with gcc.

Good luck,
roman


> -----Original Message-----
> From: Miroslav Koncar [mailto:miroslav DOT koncar AT etk DOT ericsson DOT se]
> Sent: Wednesday, May 23, 2001 4:49 AM
> To: cygwin AT cygwin DOT com
> Subject: DLL for Java Native Interface
> 
> 
> Hello, cygwin users
> 
> this might be some odd question, but I'm hoping that someone out there
> had some experience with compiling C code for Java Native Interface.
> This is what I'm trying to do: I have a simple C function 
> that I want to
> port to Java with Native Interface. According to the Java 
> instructions,
> I need to compile the code into a  dynamically loaded 
> library. Doing it
> for Solaris works perfectly with (my code is in a file called 
> Clock.c as
> you can see):
> 
> gcc -I/usr/j2se/include -I/usr/j2se/include/solaris Clock.c -o
> libClock.so
> 
> I've asked a friend who has Microsoft Visual Studio to do the same for
> Windows, and it all went well. The command he used is:
> 
> cl -Ic:\jdk\include -Ic:\jdk\include\win32 -LD Clock.c -FeClock.dll
> 
> He than has sent me that dll and it works perfectly.
> 
> I've tried to build the library with cygnus according to the
> instructions in the manual. The dll I get doesn't seem to work.
> 
> Please, if someone had any experience could you send me some
> instructions how to do that.
> 
> Thanks,
>     Miroslav
> 
> 
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple
> 

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019