|
From: Jean P. D. <dav...@vi...> - 2004-07-31 15:34:41
|
Hi to the list users,
I am trying to make a dll with the function below.
I gess this is the kind of thing it is asking for -eMyClass.dll ?
It creates a 20K dll witch does not work.
I am using Borland meanwhile. with:
C:\Borland\BCC55\Bin\bcc32.exe -c -I%include_path% -oMyClass.obj
MyClass.c
C:\Borland\BCC55\Bin\bcc32.exe -tWD -eMyClass.dll MyClass.obj
Where can I learn about DEVC++ on this?
> dllwrap.exe: no export definition file provided.
> Creating one, but that may not be what you want
--------------
#include "MyClass.h"
JNIEXPORT void JNICALL Java_MyClass_JumpElse( JNIEnv *env, jobject jThis
) {
jclass cls;
jfieldID champ;
jint luku;
jchar jch;
const char *c_ch;
cls = (*env)->GetObjectClass(env, jThis );
/* champ = (*env)->GetStaticFieldID(env, cls, "number", "I" );
luku = (*env)->GetStaticIntField(env, cls, champ );
printf("%d\n", luku);*/
champ = (*env)->GetStaticFieldID( env, cls,
"name","Ljava/lang/String");
jch = (*env)->GetStaticObjectField(env, cls, champ);
c_ch = (*env)->GetStringUTFChars(env, jch, NULL);
printf("%s\n", c_ch);
}
|