Go Down

Topic: CapSense Error: No Matching Function to Call (Read 2932 times) previous topic - next topic

tzola

Hi Folks,

I've been trying now for a couple of hours to figure out why the CapSense library is producing the following error message:

No Matching Function for Call to 'CapSense::CapSense(int,int)'

I have added the CapSense Library folder as its found here: http://arduino.cc/playground/Main/CapacitiveSensor?from=Main.CapSense
I've placed the folder in the Arduino Libraries folder with all the other libraries. C:\arduino-1.0.2\libraries\CapacitiveSense
I restarted Arduino and checked that the CapSense library is reckognized and have tried the example sketch.
All CapSense sketches that I attempt to verify produce the same error.

Does anybody know what could be happening?

Also here is the details of the error message displayed in the black console:

In file included from CapSenseSketchForLibrary.pde:1:
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:28: error: 'uint8_t' does not name a type
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:29: error: 'uint8_t' does not name a type
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:30: error: ISO C++ forbids declaration of 'uint8_t' with no type
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:30: error: expected ';' before '*' token
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:31: error: ISO C++ forbids declaration of 'uint8_t' with no type
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:31: error: expected ';' before '*' token
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:33: error: 'uint8_t' does not name a type
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:34: error: 'uint8_t' does not name a type
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:35: error: ISO C++ forbids declaration of 'uint8_t' with no type
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:35: error: expected ';' before '*' token
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:36: error: ISO C++ forbids declaration of 'uint8_t' with no type
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:36: error: expected ';' before '*' token
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:37: error: ISO C++ forbids declaration of 'uint8_t' with no type
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:37: error: expected ';' before '*' token
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:40: error: expected `)' before 'sendPin'
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:41: error: 'uint8_t' has not been declared
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:42: error: 'uint8_t' has not been declared
CapSenseSketchForLibrary:12: error: no matching function for call to 'CapSense::CapSense(int, int)'
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:15: note: candidates are: CapSense::CapSense()
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:15: note:                 CapSense::CapSense(const CapSense&)
CapSenseSketchForLibrary:13: error: no matching function for call to 'CapSense::CapSense(int, int)'
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:15: note: candidates are: CapSense::CapSense()
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:15: note:                 CapSense::CapSense(const CapSense&)
CapSenseSketchForLibrary:14: error: no matching function for call to 'CapSense::CapSense(int, int)'
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:15: note: candidates are: CapSense::CapSense()
J:\arduino-1.0.2\libraries\CapacitiveSense/CapSense.h:15: note:                 CapSense::CapSense(const CapSense&)


Thank you,
tzola

pylon

I just downloaded CapacitiveSensor04.zip, installed into the "libraries" subfolder of my sketchbook folder, opened the CapacitiveSensorSketch (the only example) and it compiled without a problem.

You probably downloaded an older version which won't work with current IDE versions. The 04 version is linked near the top of the page.

Farenz

Hi
I have downloaded CapacitiveSensor04.zip, and I have installed into the "libraries" subfolder and opened the CapacitiveSensorSketch (the only example) and it did not compile.
Tks.

pylon

Quote
I just downloaded CapacitiveSensor04.zip, installed into the "libraries" subfolder of my sketchbook folder



Quote
it did not compile


Is it possible that the IDE returned some error messages? Do you think posting these might have helped us helping you? If you installed the library and the IDE correctly the example will compile.

Go Up