Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Wed, 23 May 2001 10:49:07 +0200
From: Miroslav Koncar <miroslav.koncar@etk.ericsson.se>
Subject: DLL for Java Native Interface
To: cygwin@cygwin.com
Message-id: <3B0B7982.252CD664@etk.ericsson.se>
Organization: Ericsson
MIME-version: 1.0
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.7 sun4u)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7bit
X-Accept-Language: en

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

