delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/12/16/22:47:20

From: hughw AT scoutsys DOT com (Hugh Winkler)
Subject: dllwrap, JNI, and all that
16 Dec 1998 22:47:20 -0800 :
Message-ID: <006801be2908$49a2dd40$0c0aa8c0.cygnus.gnu-win32@harry.scoutsys.com>
Reply-To: <hughw AT scoutsys DOT com>
Mime-Version: 1.0
To: <gnu-win32 AT cygnus DOT com>

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 AT cygnus DOT com" with one line of text: "help".

- Raw text -


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