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]

Java JNI with DLL from gcc


I followed Sun's JNI tutorial example at

    http://java.sun.com/docs/books/tutorial/native1.1/stepbystep/index.html

and tried to generate the native hello.dll file using Cygnus B19 and gcc 2.7.
I had to change a couple of lines in jdk1.1.5/include/win32/jni_md.h (changed
jlong to be long instead of __int64, and JNIEXPORT to an empty #define instead
of a call to __declspec).  After generating the DLL, running the Java main
program popped up a dialog box with:

    "The application or DLL E:\java\HelloWorld\hello.dll is not a valid
    Windows NT image.  Please check this against your installation diskette."

The cygwin32 FAQ and archives talk about a five-step process, auxiliary
initialization and cleanup files, and the WINAPI keyword, which I'm hoping is
more compexity than is needed.

--Andrew Mickish
  http://www.andrew.cmu.edu/~am2q/


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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