views:

215

answers:

1

I have created a header file and a corresponding .c file full of functions I would like to use with a java program. I created a JNI header file using javah. I'm using gcc to compile my header file. How can I link my regular c object file with my JNI static library to get a static library that utilizes my C library? I'm using gcc to compile.

Here's an example of what I'm asking:

lib.h
lib.c
JNITest.h
JNITest.c (uses lib.h functions)
+2  A: 

You might try looking at this http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jniexamp.html

JustJeff
That's what I needed. Thanks.
helixed