处理找不到库 [英] Processing cannot find library

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

问题描述

我尝试从jar文件导入( quickhull3d 例如)在Linux和Mac上的处理2.2.1和3.2.1中,基于给出的指令这里

I've tried importing from a jar file (quickhull3d for example) in Processing 2.2.1 and 3.2.1 on Linux and Mac based on the instructions given here

我的目录结构如下所示

。 ./Processing/Sketchbook/libraries/quickhull3d/library/quickhull3d.jar

../Processing/Sketchbook/libraries/quickhull3d/library/quickhull3d.jar

Processing IDE首选项将sketchbook位置设置为../ Processing / Sketchbook

The Processing IDE preferences set the sketchbook location to ../Processing/Sketchbook

在我的.pde文件中,我有开头行

In my .pde file, I have the opening line

import quickhull3d.*;

我收到错误:

没有找到quickhull3d的库
库必须安装在'sketchbook'文件夹中名为'libraries'的文件夹中。

No library found for quickhull3d Libraries must be installed in a folder named 'libraries' inside the 'sketchbook' folder.

注意 :我已经在这里和处理论坛上反复询问过这个问题,并且尽我所知,我按照书面说明进行操作。我在尝试运行草图之前已经重新启动了IDE,并且我也尝试将quickhull3d.jar复制到/ mysketch / code,这是手动执行IDE如果要将文件拖放到它上面所做的事情。

Note: I have seen this question asked repeatedly both here and on the Processing forum and to the best of my ability to tell, I am following the instructions as written. I have restarted the IDE before attempting to run the sketch and I have also tried copying quickhull3d.jar to /mysketch/code, which is manually doing what the IDE would do if you were to drag and drop the file onto it.

跟进:经过进一步调查,看起来问题是.jar文件本身没有指向正确的位置xyz.class文件,所以我相信这可能是罪魁祸首。另外,我发现 ComputationalGeometry 为Processing提供了包含QuickHull3d的库,无需我安装它手动。在将来,我将确定.jar中的路径是正确的。

Follow up: Upon further investigation, it looks like the problem is that the .jar file itself does not point to the correct locations for the xyz.class files, so I believe this may be the culprit. Additionally, I discovered that the ComputationalGeometry contributed library for Processing contains QuickHull3d, obviating the need for me to install it manually. In the future, I will make certain the paths in the .jar are correct.

推荐答案

如果您正在使用Processing编辑器,安装非标准库的最简单方法是将 .jar 文件拖到Processing编辑器上。这会将 .jar 文件移动到草图文件夹中,您可以像使用任何其他库一样使用它。

If you're using the Processing editor, the easiest way to install a non-standard library is to just drag the .jar file onto your Processing editor. This will move the .jar file into your sketch folder, and you can use it just like you can use any other library.

这篇关于处理找不到库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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