Link errors: Confused about calling C code from GCJ via jni
Tom Tromey
tromey@redhat.com
Sun Jan 14 11:22:00 GMT 2001
>>>>> "Barnet" == Barnet Wagman <wagman@enteract.com> writes:
Barnet> The header generated by gcjh looks like C to me, but when I
Barnet> try to link this library against gcj compiled java, it looks
Barnet> as if gcj is looking for C++.
It is.
If you have a Java class with native methods written using JNI and not
CNI, then you have to compile that class using `-fjni'. This will
cause gcj to generate the appropriate stubs for making JNI calls.
This won't work if you are using gcj 2.95, because JNI was not
implemented until after that release.
This is one of many topics that will be addressed by the
documentation.
Tom
More information about the Java
mailing list