From: mickish AT cmu DOT edu (Andrew Mickish) Subject: DLL without import library? 29 May 1998 02:16:04 -0700 Message-ID: <356D7761.648FC575.cygnus.gnu-win32@cmu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: gnu-win32 AT cygnus DOT com Is it possible to skip the step of linking a DLL's import library with the final executable? I've been trying to avoid using VC++ for Java JNI development. However, VC++ works great for generating Java-compatible DLL's, and gcc doesn't (or I can't figure out the trick). Sun's JNI tutorial, at http://java.sun.com/docs/books/tutorial/native1.1/stepbystep/ , apparently relies on the VC++-specific keyword __declspec(dllexport) to export functions from the DLL. When java.exe interprets my Java program, it finds the VC++ DLL on my path, loads it, and happily accesses the exported functions. If I comment-out the VC++-specific code and compile with gcc, running my Java program gives me a dialog box saying: "The application or DLL E:\java\HelloWorld\hello.dll is not a valid Windows NT image. Please check this against your installation diskette." I am not stripping the DLL or anything fancy -- just following the tutorial example. Am I supposed to be able to augment executables just by throwing DLLs on the path, or would recompiling java.exe be required? --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".