• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in compiling C file with JNI

 
rajshkhr pandey
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello to all,
I have a JNI tutorial in which a JNI program in developed.
But after creating the header file using "javah -jni " command when I use that header file in to the C implementation it gives error
Following code is of HelloWorld.cpp in which the header file in included

The error is


I have copied the header file to the include directory for TurboC folder.
My java class "HelloWorld.java" is

After compiling I use "javah -jni HelloWorld" which produce HelloWorld.h file

Please suggest me what to do.
Thanks in advance
 
Rob Spoor
Sheriff
Pie
Posts: 20610
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is your HelloWorld.h file located in the same folder as the HelloWorld.cpp folder? Is this also the current folder when invoking your compiler?
 
rajshkhr pandey
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I the header file is in same folder in which my HelloWorld.cpp file is.

Even I have copied it to the include directory of turboc but same error arise.
Thank for your reply
 
rajshkhr pandey
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one please suggest me what to do??
What is the problem, that I am not able to compile the C program.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic