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]

Error while compiling a class for jni


Hi,

I just ran into an strage Error. I'm using gcc 3.0. I wrote a java file 
test.java, this file contains only a single native method testme(int).

I'm compiling with gcc -fjni -c test.java

nm test.o prints : 
000000a0 T _GLOBAL__I__ZN4testC1Ev
         U _Jv_GetJNIEnvNewFrame
         U _Jv_JNI_PopSystemFrame
         U _Jv_LookupJNIMethod
         U _Jv_RegisterClass
00000000 d _MT_test
00000000 r _Utf1.1
0000000a r _Utf2.2
00000016 r _Utf3
00000022 r _Utf4
0000002a r _Utf5
         U _ZN4java4lang6Object5cloneEv
         U _ZN4java4lang6Object6class$E
         U _ZN4java4lang6Object6equalsEPS1_
         U _ZN4java4lang6Object8finalizeEv
         U _ZN4java4lang6Object8hashCodeEv
         U _ZN4java4lang6Object8toStringEv
         U _ZN4java4lang6ObjectC2Ev
00000040 D _ZN4test6class$E
00000020 T _ZN4test6testmeEi
00000000 T _ZN4testC1Ev
         U _ZTVN4java4lang5ClassE
00000020 D _ZTVN4testE
00000000 ? __FRAME_BEGIN__
         U __gcj_personality_v0
00000000 b meth.0

Gcj seems to add some jni declarations, but as far as I can see the testme 
function is still declared for the cni interface (I need to link to a 
precompiled jni library, that's because I can't use cni :) ).  I compiled 
gcc3.0 myself with --enable-threads=posix, nothing else. Did I miss something 
while configuring ? gcjh generates correct jni header files when using the 
jni option btw. 

Thanks in advance
        Thomas


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