Home \ Help \ Search \ Login RSS

Welcome, Guest. Please Login

[size=16][highlight][color=#ff0000][b]This forum is now [u]READ-ONLY[/u]! Please visit [url]http://forum.wiring.co/[/url] for the new forum.[/b][/color][/highlight][/size]

Wiring ForumProgramming Questions & HelpSyntax › struct not supported?

Page Index Toggle Pages: 1
struct not supported? (Read 2597 times)
09/02/09 at 15:06:37

roypardi   Offline
Junior Member
I Love YaBB 2!
Boston USA

Posts: 57
**
 
Hi-
I've been stuck on this for a few days and have searched all the available posts and documentation without finding any helpful information.

I am trying to use struct and typedef in my sketch but keep getting compile errors

[i]
error: variable or field 'test' declared voidBad error line: -2[/i]

A barebones test sketch - I am using an external header file (vars.h) which resides in its own folder in the Library folder:

[code]typedef int16_t STEPPER_COORD;          

typedef struct _stepper_xy {
 STEPPER_COORD x;
 STEPPER_COORD y;
}
STEPPER_POINT;[/code]

And this simple sketch:

[code]#include <vars.h>

void test(STEPPER_POINT pt){
 pt.x = 50;
 pt.y = 20;
}

void setup(){

}

void loop(){

}[/code]

I don't know what else to try. Is there any documentation on the Wiring build process or other sources I can look at to try to solve this?

thanks, Roy
 
IP Logged
 
Page Index Toggle Pages: 1