sghr / iGeo

iGeo: Computational Design and 3D Modeling Library for Processing
http://igeo.jp
GNU Lesser General Public License v3.0
146 stars 34 forks source link

java.lang.NoSuchFieldError when trying to import iGeo in a new Processing 2.1 sketch #5

Open gillesv opened 10 years ago

gillesv commented 10 years ago

Hi! I came across your library via http://processing.org/reference/libraries/, as I'm looking for a library that will let me import & manipulate NURBS. I downloaded the latest version (beta 0.9.0.4) here: http://igeo.jp/igeo.zip, unzipped it and added it to my ~/Sketchbook/libraries/ directory. It shows up under Sketch > Import Library > iGeo, so I figure the library was installed properly.

screen shot 2013-11-13 at 18 36 32

I followed your tutorial and proceeded to import the library, as well as processing.opengl.*, but when I try to compile with nothing more than these 2 imports and a size statement:

import processing.opengl.*;
import igeo.*;

size(640, 480, IG.GL);

I get the following error:

screen shot 2013-11-13 at 18 34 29

NoSuchFieldError: You may be using a library that's incompatible with this version of Processing. java.lang.NoSuchFieldError: canvas at igeo.p.PIGraphicsGL2.initPrimary(PIGraphicsGL2.java:156) at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1600) at processing.core.PApplet.run(PApplet.java:2177) at java.lang.Thread.run(Thread.java:744)

What am I doing wrong? Can you help me? Your library is exactly what I'm looking for if only I could get it running, so I'd be much obliged.

Cheers

sghr commented 10 years ago

I guess Processing version 2.1 changed some internal mechanism and removed some stuff the library was relying on. I need to update it to catch up with the Processing version but if you are in a hurry, you can use Processing version 2.0.3 to use the current iGeo. Thanks