delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/05/21/02:52:26

From: mlx AT san DOT rr DOT com (Steve Biskis)
Subject: Re: Java JNI with DLL from gcc
21 May 1998 02:52:26 -0700 :
Message-ID: <199805201441.HAA24038.cygnus.gnu-win32@prefetch-atm.san.rr.com>
Reply-To: <mlx AT san DOT rr DOT com>
Mime-Version: 1.0
To: "Andrew Mickish" <mickish AT cmu DOT edu>
Cc: <gnu-win32 AT cygnus DOT com>

Yep.  Been there toiled with that.


When this happened to me, it was due to stripping the relocatable DLL.
This messes up the image.

The most complete fix:

1. Upgrade to egcs-1.0.2 for a better gcc.exe ... etc.
2. Upgrade to binutils-2.9 for a usable ld.exe ... etc.

If your NOT stripping the DLL than these steps may not solve your problem.

Look VERY carefully at the discussion/examples in the relocatable DLLs
section of the Cygnus web page.  If you absorb that, you're there.

----------
> From: Andrew Mickish <mickish AT cmu DOT edu>
> To: gnu-win32 AT cygnus DOT com
> Subject: Java JNI with DLL from gcc
> Date: Tuesday, May 19, 1998 5:20 AM
> 
> 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 AT cygnus DOT com" with one line of text: "help".
-
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".

- Raw text -


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