This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/28153] Under Windows Xp the generated JNI headers need to have a '_' prepended for each function.
- From: "bcmpinc at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jun 2006 21:01:51 -0000
- Subject: [Bug java/28153] Under Windows Xp the generated JNI headers need to have a '_' prepended for each function.
- References: <bug-28153-12871@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from bcmpinc at hotmail dot com 2006-06-26 21:01 -------
(In reply to comment #1)
> Does the JDK's javah put that "_" into the generated header?
No, JDK's javah creates a header equivalent to the header created by 'gcjh
-jni'.
> I suspect that you are seeing a problem with the C compiler, not a problem
> with JNI header generation.
I tried compiling with JDK's jni-headers and the javah-header. It still needs
the "_" prepended.
> In particular I think that "_", most likely, should be added by the C
> compiler and not added to the header.
I think you're right, but it's strange that the C compiler should recognize
that it's compiling a native java function. Most exported non-java functions
don't have a "_" prepended, even if they're in a library containing a lot of
java functions.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28153