|
Hello C-Forum,
Few days ago, I started to work with gnu utilities
to compile (icc) and bind (ld) ILE/C programs. I'm satisfied with it, but exists
a little problem that I find when I tried to compile a jni program.
I see that ILE/C compiler works diferent with the
actually directory when compiles from SCRMBR and SRCSTMF
options. When the compiler works with SRCMBR option
omits the actual directory (pwd in unix) and assumes that is always in root
(/) directory, with SRCSTMF option, compiler works correctly with actual
directory.
I try to explain it with this sample, I
have the next code as SRCFILE at
/QSYS.LIB/MYLIB.LIB/QCSRC.FILE/SAMPLE.MBR and as SRCSTMF at
/mySources/sample.c
#include
<stdlib.h>
#include
<jni.h>
JNIEXPORT void JNICALL
Java_com_DoNothingDeNothing( JNIEnv *jenv, jclass jcls )
{
/* este pgm es estupido pero compila */
}
1º change directory CD '/mySources'
2º CRTCMOD
MODULE(SAMPLE) SRCSTMF(sample.c), with errors
3º CRTCMOD MODULE(SAMPLE)
SRCFILE(MYLIB/QCSRC) SRCMBR(SAMPLE), without errors.
4º change directory root CD '/'
5º CRTCMOD
MODULE(SAMPLE) SRCSTMF(/mySources/sample.c), without
errors The step 2 has problems because the include file
jni.h of qsysinc has an include to QJAVA/H/JNI that is a relative to
root path. The same source compiles in step 5 from root
directory.
The step 3 assume that is compiling from root
directory instead /mySources, and then ends without errors.
I posted this problem to CAS IBM Spain, but I think
that they doesn´t understand me. I think that Rochester must repair the
qsysinc jni, jni_md and jvmdi includes members and they must check all
sources with relatives paths.
Regards
Adolfo López
Aguas de Alicante, E.M.
|
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.