在ARM上编译JInput [英] Compile JInput on ARM

查看:61
本文介绍了在ARM上编译JInput的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Raspberry Pi 2和一个设置为操纵杆的arduino pro micro.在Pi上,我有一个Java应用程序,该应用程序在连接了arduino游戏杆的Linux和Windows电脑上都可以很好地运行.但是,一旦我开始在pi上运行程序,就会收到类似以下错误消息:

I have a Raspberry Pi 2, and an arduino pro micro set up as a Joystick. On the Pi i have a java application that runs well on a PC with both Linux and Windows with the arduino joystick connected. But as soon as I start running the program on the pi I get an error message like:

`Failed to load library:" /libjinput-linux64.so: /libjinput-linux64.so`

经过一番搜索之后,我发现问题是Jinput库没有编译为可以在ARM处理器上运行:

After some googling around i find that the problem is that the Jinput library is not compiled to run on ARM processors:

RaspberryPi上的JInput

到目前为止,还不错,但是到目前为止,我找不到关于如何编译.so文件以在arm处理器上运行的解决方案.我想这对于有知识的人来说是微不足道的,因为该文件很容易反编译并且该项目是开源的.

So far so good, but this far I could not find a solution as to how I get the .so file compiled to run on the arm processor. I guess it is somewhat trivial for someone with the knowledge, since the file is easily decompiled and the project is open source.

但是,在过去的1.5个月中,我一直处于这一阶段.任何有关如何进行编译的帮助都将是有帮助的.

But I have been stuck at this stage for the last 1½ month. Any help as to how to compile it where to find the files that are to be compiled and such, or alternatively finding an already compiled file for the raspberry pi 2 would be helpful.

推荐答案

不是有关如何编译JNI库的直接答案,但是Raspbian上似乎有一个预编译的版本:

Not a direct answer about how to compile JNI libraries, but there appears to be a pre-compiled version available on Raspbian:

> apt search jinput
Sorting... Done
Full Text Search... Done
libjinput-java/stable 20100502+dfsg-7 all
  Java Game Controller API

libjinput-java-doc/stable 20100502+dfsg-7 all
  Java Game Controller API (javadoc)

libjinput-jni/stable 20100502+dfsg-7 armhf
  Java Game Controller API (jni)

因此解决方案可能只是apt install libjinput-java;这可能会包含-jni软件包作为依赖项(请参阅此处).

So the solution may be to just apt install libjinput-java; this will probably include the -jni package as a dependency (see here).

这篇关于在ARM上编译JInput的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆