This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

CNI



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 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]