Hi All,
I have a problem when trying to compile jni code with option METAL. May be because there isn't a jni.h under the directory /usr/include/metal?
My initial plan is :
A simple caller named DFSJVM00:
- compile in 31-bit mode with option METAL
- has only 2 lines :
int DFSJVM64(int) __attribute__((amode64));
int jvm00 (int func) {
return(DFSJVM64(func));
}
Compile C and Assembler source is OK. I use the following sample bind job to bind the caller:
//BIND EXEC PGM=IEWL, // PARM='AMODE=31,MAP,CASE=MIXED' //SYSLMOD DD DSNAME=HLQ.LOAD(MYCODE),DISP=SHR 1 //SYSPRINT DD SYSOUT=* //OBJECT DD DSN=HLQ.OBJ,DISP=SHR //SYSLIN DD * INCLUDE OBJECT(DFSJVM00) ENTRY DFSJVM00 2 /*
I got the error: IEW2456E 9207 SYMBOL DFSJVM64 UNRESOLVED. So I write the called program named DFSJVM64 and compiled it in 64-bit mode
and with option METAL. This is a jni code and I guess because there isn't a jni.h under the directory /usr/include/metal so the compilation failed.
Then I change the plan: the jni code will be compiled and linked without the option METAL and both are done successfully (named DFSJVM6L). The called program DFSJVM64 will dllload the DFSJVM6L and call dllqueryfn("DFSJVM6L"). And again, the dll.h isn't under the directory /usr/include/metal, so the compile is failed.
Another plan: the called program just calls the function DFSJVM6L directly. Compile is OK. But when I run the bind job for the
caller, if I don't include the jni code, I mean if I have SYSLIN as:
//SYSLIN DD * INCLUDE OBJECT(DFSJVM00) INCLUDE OBJECT (DFSJVM64) ENTRY DFSJVM00 2 /*
I got the error:IEW2456E 9207 SYMBOL DFSJVM6L UNRESOLVED. But if I include the DFSJVM6L in then I get different error
due to the bind job is in 31-bit mode but the jni code in 64-bit mode.
Does anyone have any solution?
Thank you very much for reading a long story.
Bach Doan
BachDoanIMS