Re: Under Linux, Call java from C++



You are right. My java version is 1.4.2_05.
So I changed the codes into
vm_args.version = JNI_VERSION_1_4_2_05;

But the error kept the same:

rakta:~/GAQ$ gcc -Wall -D_REENTRANT -I
/home/gao/java/j2sdk1.4.2_08/include -I
/home/gao/java/j2sdk1.4.2_08/include/linux-c invokeLinux.cpp
invokeLinux.cpp: In function `int main()':
invokeLinux.cpp:24: error: `JNI_VERSION_1_4_2_05' undeclared (first use
this
function)
invokeLinux.cpp:24: error: (Each undeclared identifier is reported only
once
for each function it appears in.)

:-(

.



Relevant Pages

  • Re: Under Linux, Call java from C++
    ... > So I changed the codes into ... > invokeLinux.cpp: In function `int main': ... [do not email me copies of your followups] ... Prev by Date: ...
    (comp.lang.java.programmer)
  • Re: Java or C++?
    ... > Scott Moore wrote: ... Java is slow, ... int main ... Prev by Date: ...
    (comp.programming)
  • Re: Math.abs
    ... > definition absolut value is always positive. ... Why it is implemented in Java in this way? ... you should not expect an `int' to imitate ... Prev by Date: ...
    (comp.lang.java.programmer)
  • Re: How easy managed codes be reversed engineered?
    ... Do you mean all codes can be reversed compiled even it is "private"? ... Using the same problem, Reflector? ... >> So .net managed codes are far safer than Java, ... Prev by Date: ...
    (microsoft.public.dotnet.general)
  • Re: [Q] fast way to negate?
    ... >What's the fastest way to negate a number in Java? ... >int x = 1; ... http://mindprod.com Java custom programming, consulting and coaching. ... Prev by Date: ...
    (comp.lang.java.programmer)