This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: load native lib (SWT) with JNI on windows


>>>>> "Ranjit" == Ranjit Mathew <rmathew@vsnl.net> writes:

Ranjit> To complement the situation perfectly, the MinGW ld omits the
Ranjit> underscore in both the cases and adds the @nn for stdcall
Ranjit> functions.

Is it really ld that does this?  I thought the compiler made all the
name mangling decisions.

Ranjit> Therefore, for a given JNI method fooBar( ) implemented in a DLL,
Ranjit> the LookupJNIMethod( ) function must search for all of
Ranjit> "fooBar@nn" (GCC), "_fooBar@nn" (MSVC) and "fooBar" (BCC).
Ranjit> (Assuming these are the only compilers we care to support.)

Was this decision made consciously by gcc?  Maybe it is just a bug and
we should also prefix `_' to stdcall methods.  Can you find out?

In any case it looks like we'll need more Windows-specific code in the
JNI lookup.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]