Mail Archives: cygwin/1998/10/20/07:57:22
Howdy,
>>>> "MK" == Mumit Khan <khan AT xraylith DOT wisc DOT edu> writes:
MK> For help on creating relocatable DLLs, see my dllhelpers package at
MK> http://www.xraylith.wisc.edu/~khan/software/gnu-win32/. Colin Peters
MK> has a nice intro on creating dlls as well on his web page (follow
MK> the link from my "Related Sites" area).
Q#1: Gcc, Java, and dlls. Using Mumit's recommendations and others I was
able to create a dll with all my JNI calls and nm confirms that they are
there. However when I try to open the DLL from Java I get:
Error: error: java.lang.UnsatisfiedLinkError: no libjtoc in shared
library path
I do have the directory in which libjtoc.dll resides in the PATH
environment variable.
On the Sun and HP one deletes the 'lib' prefix to the libjtoc. I
have tried it both ways on the PC - both failing similarly.
Java code snippet looks like:
String libname = "libjtoc";
try {
System.loadLibrary(libname);
} catch (UnsatisfiedLinkError Err) {
gutil.errorMsg("error: " + Err);
return;
}
Suggestions to fix this?
Q#2: When trying to link a couple of other static libraries into the dll for
which I don't have source I get a number of compile error messages
complaining about:
undefined reference to "_imp__<some function>"
Where <some function> includes:
free
fprintf
printf
malloc
strncpy
etc....
What could be causing this? The libraries include C and C++ code.
Q#3: I assume that Java JNI requires a relocatable DLL. Is that correct?
Any help on any of these questions would be appreciated.
Thanks,
--
Glen Fullmer,(847)538-3082, Mail: <gfullmer AT ccrl DOT mot DOT com>,
*******************************************************************************
* "For a successful technology, reality must take precedence *
* over public relations, for Nature cannot be fooled." - Richard P. Feynman *
*******************************************************************************
-
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 -