Processing cannot find library

江枫思渺然 提交于 2019-12-13 17:29:19

问题


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

My directory structure looks like this

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

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

In my .pde file, I have the opening line

import quickhull3d.*;

and I get the error:

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

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.

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.


回答1:


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.



来源:https://stackoverflow.com/questions/40137428/processing-cannot-find-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!