Calling C from Java (Android)

Discussion in 'Game Development (Technical)' started by Jamie W, Jul 18, 2012.

  1. Jamie W

    Original Member Indie Author

    Joined:
    Apr 16, 2006
    Messages:
    1,211
    Likes Received:
    0
    I'm trying to call C code from Java. This has had me stumped all day.

    So, I have Eclipse, the Andriod SDK and NDK all setup. I followed some of the examples with the NDK (for calling C code).

    I've got my own project setup. It runs fine (without calling any C), and displays some text on screen etc.

    I have a jni folder setup, with some C files, that I'm compiling and linking to a lib, all seems okay. I'm using the same mechanism as per the NDK examples, for calling C from Java. But no joy...

    It compiles and runs, but at run time, can't seem to find the library or C function.

    Help!
     
  2. Jamie W

    Original Member Indie Author

    Joined:
    Apr 16, 2006
    Messages:
    1,211
    Likes Received:
    0

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer