[Bug java/28153] Under Windows Xp the generated JNI headers need to have a '_' prepended for each function.
dannysmith at users dot sourceforge dot net
gcc-bugzilla@gcc.gnu.org
Mon Jun 26 21:25:00 GMT 2006
------- Comment #3 from dannysmith at users dot sourceforge dot net 2006-06-26 21:21 -------
I think you may be running into a compiler (MSVC vs GNUC) difference between
handling of __stdcall (==JNICALL) symbols.
For a function void __stdcall foo (int),
both MSVC and GNUC generate an assembler name of '_foo@4'. The underscore is
prefix to all assembler names, the @4 is unique to stdcall
MSVC uses the name '_foo@4' in the dll export table when exporting from a dll,
but 'foo@4' when exporting from a staticly linked object.
GNUC uses 'foo@4' in both.
If you look in info for binutils, under dlltool, you will see
--ext-prefix-alias <prefix> Add aliases with <prefix>.
That might help. However, I don't think that similar is supported by ld.
Danny
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28153
More information about the Gcc-bugs
mailing list