Wiring Forum
Programming Questions & Help >> Syntax >> struct not supported?

Message started by roypardi on 09/02/09 at 15:06:37

Title: struct not supported?
Post by roypardi on 09/02/09 at 15:06:37
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

error: variable or field 'test' declared voidBad error line: -2

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

typedef int16_t STEPPER_COORD;          

typedef struct _stepper_xy {

And this simple sketch:

#include <vars.h>

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

void setup(){


void loop(){


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

Wiring Forum » Powered by YaBB 2.5 AE!
YaBB Forum Software © 2000-2010. All Rights Reserved.