dllwrap, JNI, and all that

Hugh Winkler hughw@scoutsys.com
Wed Dec 16 13:49:00 GMT 1998


Hi all,

Thanks Mumit for the bintools, which I'm just getting my first exposure to.
Very glad not to have to do the five-step program to build a relocatable dll
for JNI.

I can *almost* automatically build some JNI code using dllwrap. The
showstopper is simply that the -U (the dlltool option to prepend underscore
to interface library symbols) does not apply to the actual symbols in the
dll file. VC prepends the underscore, gcc does not. -U is great if you're
going to link  to an interface library, but no help if someone is going to
call Loadlibrary on your dll, on some names they expect to have leading
underscores (i.e. the JVM).

Is there actually an easy way, like throw some switch on some tool, to
prepend the underscore? I can easily believe I've missed something.

(I know two workarounds, that are not really practical for our situation. a)
supply a .def file with changed names, and b)Conditionally compile in a
prepended underscore to exported symbols.)

If there's no easy way I've overlooked, I'll try to supply a fix, time
permitting. (We're going to use cl for the time being). Should dlltool's -U
actually change the symbols exported from the dll as well?


Hugh Winkler
Scout Systems, Inc.

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



More information about the Cygwin mailing list