CNI

dipen nipun shah dipshah@rediffmail.com
Wed Jan 9 23:23:00 GMT 2002


Hello I want to use java class object in C program for that I've wrriten code like

#include<stdio.h>
#include <gcj/cni.h>
//#include <java/lang/Math.h>
using java::lang::Math;

main()
{
jdouble d1 = (java::lang::Math::random());
printf("is %d",d1);
}                

but when I've compiled this code in Linux by giving 
c++ First.c 

it is giving me error like
/tmp/ccMXgkFb.o(.test+0x7) Undefined reference to java::long::Math::random()

My E-mailID is dipshah@rediffmail.com
Any help on these issues or any informed opinions on which implementation route to take would be greatly appreciated 




More information about the Java mailing list