Code Monkey home page Code Monkey logo

Comments (8)

twall avatar twall commented on September 13, 2024

No, there have not as yet been any android-specific patches applied to JNA.

On Aug 25, 2011, at 4:05 PM, Jotschi wrote:

Hello,

has this patch been merge into the codebase?
http://code.google.com/p/javacv/downloads/detail?name=jna-android-20101202.patch

I'm currently eager to evaluate JNA for Android as described here:
http://code.google.com/p/javacv/wiki/JNAOnAndroid

Thank you

Greetings

Jotschi

Reply to this email directly or view it on GitHub:
#23

from jna.

twall avatar twall commented on September 13, 2024

Feel free to fork to get that patch working and share it.

from jna.

netjunki avatar netjunki commented on September 13, 2024

I'm also interested in looking at this. I've forked the project and applied the patch. It required a couple of minor changes since there have been some changes to Structure.java since the patch was created it looks like. Though I'm running into some issues getting it to compile... currently tracking that down.

from jna.

Jotschi avatar Jotschi commented on September 13, 2024

Sounds interesting. Which problems have you encountered?

from jna.

netjunki avatar netjunki commented on September 13, 2024

So far I'm running into the following issue when running ant to build the android version with the following command:
ant jar compile-tests -DCC=/Users/ben/Work/android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/darwin-x86/bin/arm-eabi-gcc -DANDROID_HOME=/Users/ben/Work/android-ndk-r5b/platforms/android-8/arch-arm

This results in the following error:
[javac] /Users/ben/Work/jna-android/src/com/sun/jna/NativeLibrary.java:141: cannot find symbol
[javac] symbol : method open(java.lang.String)
[javac] location: class com.sun.jna.NativeLibrary
[javac] handle = open(libraryPath);
[javac] ^
[javac] 1 error

But I have a suspicion that this is due to some configuration error with the project... I just didn't have time to keep looking at it earlier due to work constraints. The original patches were developed against an earlier version of the NDK... so it's possible that's the core source of the problem. Feel free to look into it. I already pushed the integrated patch to my fork.

from jna.

twall avatar twall commented on September 13, 2024

All native functions now live in the Native class; only publicly accessible native functions had aliases left in for them.

So to fix that error you just need to change "open" to "Native.open".

On Sep 15, 2011, at 6:06 PM, netjunki wrote:

So far I'm running into the following issue when running ant to build the android version with the following command:
ant jar compile-tests -DCC=/Users/ben/Work/android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/darwin-x86/bin/arm-eabi-gcc -DANDROID_HOME=/Users/ben/Work/android-ndk-r5b/platforms/android-8/arch-arm

This results in the following error:
[javac] /Users/ben/Work/jna-android/src/com/sun/jna/NativeLibrary.java:141: cannot find symbol
[javac] symbol : method open(java.lang.String)
[javac] location: class com.sun.jna.NativeLibrary
[javac] handle = open(libraryPath);
[javac] ^
[javac] 1 error

But I have a suspicion that this is due to some configuration error with the project... I just didn't have time to keep looking at it earlier due to work constraints. The original patches were developed against an earlier version of the NDK... so it's possible that's the core source of the problem. Feel free to look into it. I already pushed the integrated patch to my fork.

Reply to this email directly or view it on GitHub:
#23 (comment)

from jna.

netjunki avatar netjunki commented on September 13, 2024

Ah... hadn't gotten to look deeply at this... but that's now fixed... next we have a compilation error with the native portions...

 [exec] checking whether make sets $(MAKE)... 
 [exec] configure: error: in `/Users/ben/Work/jna-android/build-d64/native/libffi':
 [exec] configure: error: C compiler cannot create executables
 [exec] See `config.log' for more details
 [exec] make: *** [/Users/ben/Work/jna-android/build-d64/native/libffi/.libs/libffi.a] Error 77

Though it looks like the main issue here is that configure is picking up the wrong settings for doing cross compilation.

from jna.

twall avatar twall commented on September 13, 2024

There is now an android branch created, set up for cross-compiling. Please make contributions to that branch, and open specific issues that you find.

from jna.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.