Hi!
I'm new in using arduino programming.
First, I tried how to calibrate my 2.4"TFT Touchscreen Shield in Arduino Uno R3
But, I encounter an error. I googled the error. I saw some same scenario. I already tried those suggestions.
Still got same error.
I opened the Example>UTouch>Calibration for the calibration
This is the photo of the error.
Wish you can help me. =(
That's the last error in a long string. What is the FIRST error?
And please, just copy-and-paste, not take a screenshot.
The library is almost certainly not installed in the correct folder. Where exactly (the full path) is it installed and did you stop/start the IDE after installing it ?
majenko:
That's the last error in a long string. What is the FIRST error?And please, just copy-and-paste, not take a screenshot.
Sorry, hmm. this is the copy of the error.
UTouch_Calibration:34: error: 'UTFT' does not name a type
UTouch_Calibration:46: error: 'UTouch' does not name a type
UTouch_Calibration.ino: In function 'void setup()':
UTouch_Calibration:65: error: 'myGLCD' was not declared in this scope
UTouch_Calibration:69: error: 'myTouch' was not declared in this scope
UTouch_Calibration:69: error: 'PORTRAIT' was not declared in this scope
UTouch_Calibration.ino: In function 'void drawCrossHair(int, int)':
UTouch_Calibration:77: error: 'myGLCD' was not declared in this scope
UTouch_Calibration.ino: In function 'void readCoordinates()':
UTouch_Calibration:93: error: 'myGLCD' was not declared in this scope
UTouch_Calibration:94: error: 'CENTER' was not declared in this scope
UTouch_Calibration:95: error: 'myTouch' was not declared in this scope
UTouch_Calibration:97: error: 'myTouch' was not declared in this scope
UTouch_Calibration.ino: In function 'void calibrate(int, int, int)':
UTouch_Calibration:129: error: 'myGLCD' was not declared in this scope
UTouch_Calibration:134: error: 'CENTER' was not declared in this scope
UTouch_Calibration:139: error: 'myTouch' was not declared in this scope
UTouch_Calibration.ino: In function 'void waitForTouch()':
UTouch_Calibration:144: error: 'myTouch' was not declared in this scope
UTouch_Calibration:145: error: 'myTouch' was not declared in this scope
UTouch_Calibration:146: error: 'myTouch' was not declared in this scope
UTouch_Calibration.ino: In function 'void startup()':
UTouch_Calibration:168: error: 'myGLCD' was not declared in this scope
UTouch_Calibration:173: error: 'CENTER' was not declared in this scope
UTouch_Calibration:178: error: 'LEFT' was not declared in this scope
UTouch_Calibration:192: error: 'LEFT' was not declared in this scope
UTouch_Calibration.ino: In function 'void done()':
UTouch_Calibration:214: error: 'myGLCD' was not declared in this scope
UTouch_Calibration:220: error: 'CENTER' was not declared in this scope
UTouch_Calibration:225: error: 'LEFT' was not declared in this scope
UTouch_Calibration:247: error: 'LEFT' was not declared in this scope
UTouch_Calibration.ino: In function 'void fail()':
UTouch_Calibration:273: error: 'myGLCD' was not declared in this scope
UTouch_Calibration:279: error: 'CENTER' was not declared in this scope
UTouch_Calibration:282: error: 'LEFT' was not declared in this scope
UTouch_Calibration.ino: In function 'void loop()':
UTouch_Calibration:295: error: 'myGLCD' was not declared in this scope
UTouch_Calibration:306: error: 'CENTER' was not declared in this scope
UTouch_Calibration:318: error: 'PORTRAIT' was not declared in this scope
UTouch_Calibration:318: error: 'LANDSCAPE' was not declared in this scope
UTouch_Calibration:323: error: 'PORTRAIT' was not declared in this scope
UTouch_Calibration:328: error: 'PORTRAIT' was not declared in this scope
UTouch_Calibration:349: error: 'PORTRAIT' was not declared in this scope
UTouch_Calibration:354: error: 'PORTRAIT' was not declared in this scope
UTouch_Calibration:377: error: 'PORTRAIT' was not declared in this scope
UTouch_Calibration:377: error: 'LANDSCAPE' was not declared in this scope
That certainly does sound like you don't have the library installed properly.
UKHeliBob:
The library is almost certainly not installed in the correct folder. Where exactly (the full path) is it installed and did you stop/start the IDE after installing it ?
hmm. sir, where should I put my Utouch Library?
majenko:
That certainly does sound like you don't have the library installed properly.
I see. hm. Can you give me a link sir where can i Download the Utouch Library and where should I Put it?
Have you followed the standard library installation instructions?
majenko:
Have you followed the standard library installation instructions?
Yes sir.
Arduino>Libraries>UTouch>UTouch_Calibration
(These are the Files UTouch_Calibration Folder: UTouch_Calibration.h , UTouch_Calibration.cpp and UTouch_Calibration.ino)
I think you need to move the directory up one level. You have it at:
Arduino>Libraries>UTouch>UTouch_Calibration
and it usually has a directory name that's the same as the library, so it becomes:
Arduino>Libraries>UTouch_Calibration
That is, get rid of the UTouch level and move everything "up" one level. See if that works.
econjack:
I think you need to move the directory up one level. You have it at:Arduino>Libraries>UTouch>UTouch_Calibration
and it usually has a directory name that's the same as the library, so it becomes:
Arduino>Libraries>UTouch_Calibration
That is, get rid of the UTouch level and move everything "up" one level. See if that works.
Done it.
Changed Errors.
UTouch\UTouch.cpp.o: In function UTouch::touch_WriteData(unsigned char)': /hardware/avr/HW_AVR.inc:1: multiple definition of UTouch::touch_WriteData(unsigned char)'
UTouch_Calibration.cpp.o:C:\Users\user\Desktop\UTFT\examples\Arduino (ARM) + Teensy\libraries\UTouch/hardware/avr/HW_AVR.inc:1: first defined here
UTouch\UTouch.cpp.o: In function UTouch::touch_ReadData()': /hardware/avr/HW_AVR.inc:20: multiple definition of UTouch::touch_ReadData()'
UTouch_Calibration.cpp.o:C:\Users\user\Desktop\UTFT\examples\Arduino (ARM) + Teensy\libraries\UTouch/hardware/avr/HW_AVR.inc:20: first defined here
UTouch\UTouch.cpp.o: In function UTouch': C:\Users\user\Desktop\UTFT\examples\Arduino (ARM) + Teensy\libraries\UTouch/UTouch.cpp:29: multiple definition of UTouch::UTouch(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)'
UTouch_Calibration.cpp.o:C:\Users\user\AppData\Local\Temp\build4352729434104129523.tmp/UTouch_Calibration.cpp:29: first defined here
UTouch\UTouch.cpp.o: In function UTouch': C:\Users\user\Desktop\UTFT\examples\Arduino (ARM) + Teensy\libraries\UTouch/UTouch.cpp:29: multiple definition of UTouch::UTouch(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)'
UTouch_Calibration.cpp.o:C:\Users\user\AppData\Local\Temp\build4352729434104129523.tmp/UTouch_Calibration.cpp:29: first defined here
UTouch\UTouch.cpp.o: In function UTouch::getX()': C:\Users\user\Desktop\UTFT\examples\Arduino (ARM) + Teensy\libraries\UTouch/UTouch.cpp:157: multiple definition of UTouch::getX()'
UTouch_Calibration.cpp.o:C:\Users\user\AppData\Local\Temp\build4352729434104129523.tmp/UTouch_Calibration.cpp:157: first defined here
UTouch\UTouch.cpp.o: In function UTouch::getY()': C:\Users\user\Desktop\UTFT\examples\Arduino (ARM) + Teensy\libraries\UTouch/UTouch.cpp:185: multiple definition of UTouch::getY()'
UTouch_Calibration.cpp.o:C:\Users\user\AppData\Local\Temp\build4352729434104129523.tmp/UTouch_Calibration.cpp:185: first defined here
UTouch\UTouch.cpp.o: In function UTouch::setPrecision(unsigned char)': C:\Users\user\Desktop\UTFT\examples\Arduino (ARM) + Teensy\libraries\UTouch/UTouch.cpp:213: multiple definition of UTouch::setPrecision(unsigned char)'
UTouch_Calibration.cpp.o:C:\Users\user\AppData\Local\Temp\build4352729434104129523.tmp/UTouch_Calibration.cpp:213: first defined here
UTouch\UTouch.cpp.o: In function UTouch::calibrateRead()': C:\Users\user\Desktop\UTFT\examples\Arduino (ARM) + Teensy\libraries\UTouch/UTouch.cpp:235: multiple definition of UTouch::calibrateRead()'
UTouch_Calibration.cpp.o:C:\Users\user\AppData\Local\Temp\build4352729434104129523.tmp/UTouch_Calibration.cpp:235: first defined here
UTouch\UTouch.cpp.o: In function UTouch::dataAvailable()': C:\Users\user\Desktop\UTFT\examples\Arduino (ARM) + Teensy\libraries\UTouch/UTouch.cpp:148: multiple definition of UTouch::dataAvailable()'
UTouch_Calibration.cpp.o:C:\Users\user\AppData\Local\Temp\build4352729434104129523.tmp/UTouch_Calibration.cpp:148: first defined here
UTouch\UTouch.cpp.o: In function UTouch::read()': C:\Users\user\Desktop\UTFT\examples\Arduino (ARM) + Teensy\libraries\UTouch/UTouch.cpp:73: multiple definition of UTouch::read()'
UTouch_Calibration.cpp.o:C:\Users\user\AppData\Local\Temp\build4352729434104129523.tmp/UTouch_Calibration.cpp:73: first defined here
UTouch\UTouch.cpp.o: In function UTouch::InitTouch(unsigned char)': C:\Users\user\Desktop\UTFT\examples\Arduino (ARM) + Teensy\libraries\UTouch/UTouch.cpp:38: multiple definition of UTouch::InitTouch(unsigned char)'
UTouch_Calibration.cpp.o:C:\Users\user\AppData\Local\Temp\build4352729434104129523.tmp/UTouch_Calibration.cpp:38: first defined here
core.a(main.cpp.o): In function main': C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/main.cpp:11: undefined reference to setup'
C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/main.cpp:14: undefined reference to `loop'
This error message makes me think you have the library installed in two different places:
C:\Users\user\Desktop\UTFT\examples\Arduino (ARM) + Teensy\libraries\UTouch/UTouch.cpp:29: multiple definition of `UTouch::UTouch(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)'
Why is it reading from the Teensy library? Also, which version of the Arduino IDE are you using?
econjack:
This error message makes me think you have the library installed in two different places:C:\Users\user\Desktop\UTFT\examples\Arduino (ARM) + Teensy\libraries\UTouch/UTouch.cpp:29: multiple definition of `UTouch::UTouch(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)'
Why is it reading from the Teensy library? Also, which version of the Arduino IDE are you using?
Im using Arduino IDE - Arduino 1.0.5
OK. Now where is the IDE actually installed? That is, what is the full path name to your Arduino 1.0.5 IDE?
econjack:
OK. Now where is the IDE actually installed? That is, what is the full path name to your Arduino 1.0.5 IDE?
C:/Program Files(x86)/Arduino
I tried to locate that teensy thing. I can't find it. All I know is I installed it once. It's in C:/Program Files (x86)/Arduino
It appears to me that the Teensy library is causing you issues when you try to compile the utouch library. It's hard for me to tell why the IDE is trying to link in the same library a second time. This is what's causing the multiple definition errors. I would try loading WIndows Explorer, and typing one of the library file names into the search box (e.g., UTouch_Calibration.cpp) and see where that file appears on your system and then remove the one that is tied to the Teensy directory.
Maybe someone else has an idea, too?
econjack:
It appears to me that the Teensy library is causing you issues when you try to compile the utouch library. It's hard for me to tell why the IDE is trying to link in the same library a second time. This is what's causing the multiple definition errors. I would try loading WIndows Explorer, and typing one of the library file names into the search box (e.g., UTouch_Calibration.cpp) and see where that file appears on your system and then remove the one that is tied to the Teensy directory.Maybe someone else has an idea, too?
I see. I'll find that Teensy. Thanks Anyways ![]()
