• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Error in creating JVM

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am just trying to create a JVM from C program however I always got the following error message during compilation. I have already include the path of the jni.h and jni_md.h during compilation
/tmp/cc8LnTgM.o: In function `main':
/tmp/cc8LnTgM.o(.text+0xc3): undefined reference to `JNI_GetDefaultJavaVMInitArgs'
/tmp/cc8LnTgM.o(.text+0xfa): undefined reference to `JNI_CreateJavaVM'
/tmp/cc8LnTgM.o(.rodata+0x74): undefined reference to `Java_test_MainWithNatives_native0'
/tmp/cc8LnTgM.o(.rodata+0x80): undefined reference to `Java_test_MainWithNatives_native1'
collect2: ld returned 1 exit status
Does anyone know how the causes of such error message and how to solve it?

Thanks
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So this is a message from a C compiler? SOUNDS like you didn't include everything needed.
 
Sita Yo
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I think so. The jni.h contains these method and I have already include them in the classpath and also use -I option to include the appropriate directory during compilation.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic