Subject: dllwrap, JNI, and all that
From: [email-masked] (Hugh Winkler)

16 Dec 1998 22:47:20 -0800
Message-ID: <[email-masked]>
Reply-To: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
To: <[email-masked]>

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
"[email-masked]" with one line of text: "help".