From: mickish AT cmu DOT edu (Andrew Mickish) Subject: Re: JNI with Cygwin32 16 Oct 1998 13:23:08 -0700 Message-ID: <36269957.9C390267.cygnus.gnu-win32@cmu.edu> References: <199810151709 DOT NAA17198 AT caip DOT rutgers DOT edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: "S. Suchitra" Cc: gnu-win32 AT cygnus DOT com One thing that I don't recall mentioning in any of my previous posts is that editing one of the Java header files is necessary. I guess VC++ defines a type called __int64, which is not defined in the gcc header files. In your jdk directory, change include/win32/jni_md.h to look like this: #define JNIEXPORT /*__declspec(dllexport)*/ #define JNICALL __stdcall typedef long jint; typedef long /*__int64*/ jlong; typedef signed char jbyte; Maybe someone else can say whether this is actually an oversight in the gcc header files. The line above about declspec has to do with the different ways that VC++ and gcc export functions from DLLs. VC++ uses a simple keyword, but gcc has a convoluted linking procedure based on an init.cc file. I have been subscribed to the list for months hoping to hear justification for this, or the announcement of a simplified procedure, but haven't heard anything yet. If you send me a trace of your remaining errors I will see if I recognize anything. --Andrew Mickish S. Suchitra wrote: > Hi, > > I have been reading your messages on the Cygwin32 mailing list > about getting JNI to work with gcc on the Cygnus Win32 interface. > I downloaded your zip file with the HelloWorld example. However I am > not able to compile it using your Makefile..it seems to be giving a > number of parse and syntax errors in header files like jni.h and some other > files in the Cygwin32 library. > > I was wondering whether you also had similar problems and how you overcame > them. I would really appreciate any pointers you may be able to give me. > I am working on a Windows Nt 4.0 machine with Cygnus Win 32 19.1 release. > > Thanking you, > Suchitra. > > srinis AT caip DOT rutgers DOT edu - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".