We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProcessing DevelopmentLibraries,  Tool Development › The package does not exist.
Page Index Toggle Pages: 1
The package does not exist. (Read 1658 times)
The package does not exist.
Mar 8th, 2010, 7:52am
 
Following my topic in which I've worked with JNI to make some functionality of the libnfc library available in Processing, I'm now trying to compile the work into a library.

Following the template instructions, I've changed the build.xml and created a new package called libnfc with a LibNFC.java file.

Running the processingLibs Buildfile results in a successful build, which generates the libNFC folder in Processing\libraries. Everything seems in place (C:\(...)\processing-1.0.9\libraries\libNFC\\library\libNFC.jar, etc.)

When I try to run a simple example:

Code:
import libnfc.*;

LibNFC rfid;

void setup() {
size(400, 400);
background(255);
}

void draw() {
rectMode(CENTER);

while(rfid.isOn()) {
stroke(0);
fill(255);
rect(200,200,100,100);

String tag = rfid.tagID();

if(tag.equals("0400ae51962281")) {
stroke(0);
fill(127,0,0);
rect(200,200,100,100);
} else if(tag.equals("04ece051962280")) {
stroke(0);
fill(255,200,200);
rect(200,200,100,100);
} else {
stroke(0);
fill(255);
rect(200,200,100,100);
}
}
background(255);
}


I get the following error: The package "libNFC" does not exist. You might be missing a library.

Any clues on what I might be doing wrong?
Re: The package does not exist.
Reply #1 - Mar 8th, 2010, 8:56am
 
Libraries:
Quote:
Contributed libraries must be downloaded separately and placed within the "libraries" folder of your Processing sketchbook.

This applies even if you made the library yourself...
Re: The package does not exist.
Reply #2 - Mar 8th, 2010, 3:34pm
 
I defined the package as libNFC and I was calling it as libnfc Embarrassed
Page Index Toggle Pages: 1