RA8875 w/ 5" Touch Display Compliing Error

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
b3miller
 
Posts: 10
Joined: Wed Jul 23, 2014 10:34 am

RA8875 w/ 5" Touch Display Compliing Error

Post by b3miller »

Afternoon,

Has anyone else seen this issue? When I try to include both the RA8875 library and the Touchscreen.h library I get the following error. Class Point does appear in the Touchscreen.h, but not that I see in the RA8875. Any known solutions? My searches have been very unsuccessful.

Thanks!

Code: Select all

In file included from C:\Users\rmiller\Documents\Arduino\libraries\TouchScreenMenu/TouchScreenMenu.h:23,
                 from Touch_Tester_1.ino:13:
C:\Users\rmiller\Documents\Arduino\libraries\TouchScreen/TouchScreen.h:11: error: redefinition of 'class Point'
C:\Users\rmiller\Documents\Arduino\libraries\RA8875/Adafruit_RA8875.h:48: error: previous definition of 'class Point'
][/code]

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: RA8875 w/ 5" Touch Display Compliing Error

Post by adafruit_support_mike »

The RA8875 header file defines a 'Point' data structure on line 47:

Code: Select all

typedef struct Point 
{
  int32_t x;
  int32_t y;
} tsPoint_t;
Since that's part of a typedef statement, just changing the name of the structure might work:

Code: Select all

typedef struct tsPoint 
{
  int32_t x;
  int32_t y;
} tsPoint_t;

User avatar
b3miller
 
Posts: 10
Joined: Wed Jul 23, 2014 10:34 am

Re: RA8875 w/ 5" Touch Display Compliing Error

Post by b3miller »

Awesome,. that resolved the issue. I also finally downloaded a decent code editor to view all these files with.

Thanks!

User avatar
Franklin97355
 
Posts: 23912
Joined: Mon Apr 21, 2008 2:33 pm

Re: RA8875 w/ 5" Touch Display Compliing Error

Post by Franklin97355 »

I also finally downloaded a decent code editor to view all these files with.
Which one are you using?

User avatar
b3miller
 
Posts: 10
Joined: Wed Jul 23, 2014 10:34 am

Re: RA8875 w/ 5" Touch Display Compliing Error

Post by b3miller »

A freebie online, Notepad++. I don't use it very often, mostly to look at library files. It works well for what I have used it for. Any suggestions for other good tools is always welcome.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”