This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug java/28153] Under Windows Xp the generated JNI headers need to have a '_' prepended for each function.



------- 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


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