• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error in creating JVM

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic