"redefinition of class" error

Hi- I’m creating some custom Library classes for a project and am running into an error I can’t track down. The error msg is:

error: redefinition of ‘class CircleLarge’/Users/rise/Documents/Arduino/libraries/exciterLib/CircleLarge.h:13: error: previous definition of ‘class CircleLarge’

But for the life of me, I can’t see where I am doing this. I’ve made classes/libraries in Arduino before (and still have the scars ;-), and run into assorted scope and type definition problems but was able to sort them out. Not so this time.

Anyway - I’ll post the code below. I’ve stripped out the function content to shorten it. The .h + .cpp files are in the Libraries folder in my Arduino user directory. The error is getting flagged on line 13 of CircleLarge.h.

thanks for any hints! – Roy

The sketch:

#include <Light.h>
#include <CircleLarge.h>
#include <CircleSmall.h>
//----------------------------------------
Light spriteArray[64];

CircleSmall leftCircle;
CircleLarge centerCircle; 
CircleSmall rightCircle;

void setup(){

  setUpCircles();
  leftCircle.init('L',0, 11, 1, 25);
  centerCircle.init(12, 51, 1, 25);
  rightCircle .init('R',52, 63, -1, 25);
}

 void loop(){
  long m = millis();

  // leftCircle.update(m);
  //  centerCircle.update(m);
  //  rightCircle.update(m);

  // draw everything :: deal with LEDs
  for (int i = 0; i < 64; i++){
    spriteArray[i].display(m);
  }
}

void setUpCircles(){
  // **********************
  // Left: 12, Center: 40, Right: 12
  // draws CCW
  //  Left & Center start at 3 o'clock - Right starts at 9 o'clock
  // loaded into array in order: L/C/R
  // ****************************
  int num;
  int offset;
  int index;

  num = 12;
  offset = 0;
  index = 0;
  // LEFT CIRCLE
  for (int i=0; i<12; i++) {
    index = i + offset;
    spriteArray[i].init(i, index);
  }

  // CENTER CIRCLE
  num = 40;
  offset = 12;
  for (int i=0; i<40; i++) {
    index = i + offset;
    spriteArray[i].init(i, index);
  }

  // RIGHT CIRCLE
  num = 12;
  offset = 52;
  for (int i=0; i<12; i++) { 
    index = i + offset;
    spriteArray[i].init(i, index);
  }
}

CircleLarge.h

#ifndef CircleLarge_h
#define CircleLarge_h
 
//#include "wiring.h"
 #include "WProgram.h"
 
class CircleLarge
{ //// THIS IS LINE 13 WHERE THE ERROR IS OCCURRING

   public:
      int state;
      int sIndex;
      int eIndex;
      int cIndex;
      int leftTrigger;
      int rightTrigger;
      long nextUpdate;
      int delayPeriod;
      int currentDelay;
      int direction;
 
      int arrayLength;
      char shiftDirection;
      
      long lastPulseLeft, lastPulseRight;
      int leftPulseStrength, rightPulseStrength;

      char leftPulseShiftDirection;
      char rightPulseShiftDirection;
      int lightArray[40][3];
      long leftTimeArray[];
      long rightTimeArray[];
  

      CircleLarge();
      void init(int s, int e, int d, int p);
      void update(long m);
      long* shiftArray(long* a, char d);
      void pulseLeft(long m, char direction);
      void pulseRight(long m);
      int getLeftPulseStength();
      int getRightPulseStength();
      void clearLeftPulseStrength();
      void clearRightPulseStrength();
      void setRightPulseShiftDirection(char d);
      void setLeftPulseShiftDirection(char d);
      void pulse(int side);
      void setDirection(int d);
  
};

#endif

CircleLarge.cpp

#include "Light.h"
#include "CircleLarge.h"

extern Light spriteArray[64];

CircleLarge::CircleLarge(){
   //
}
void CircleLarge::init(int s, int e, int d, int p){ 
}
void CircleLarge::update(long m){
 } 
long* CircleLarge::shiftArray(long* a, char d){ 
} 
void CircleLarge::pulseLeft(long m, char direction){    
}
void CircleLarge::pulseRight(long m){    
}
int CircleLarge::getLeftPulseStength(){
    return leftPulseStrength;
}
int CircleLarge::getRightPulseStength(){
    return rightPulseStrength;
}
void CircleLarge::clearLeftPulseStrength(){
    leftPulseStrength = 0;
}
void CircleLarge::clearRightPulseStrength(){
    rightPulseStrength = 0;
 }
void CircleLarge::setRightPulseShiftDirection(char d){
    rightPulseShiftDirection = d;
 }
 void CircleLarge::setLeftPulseShiftDirection(char d){
    leftPulseShiftDirection = d;
}
void CircleLarge::pulse(int side){
 }
void CircleLarge::setDirection(int d){
    direction = d;
}

What's in Light.h?

Hey thanks for asking ;-)

I relaunched the Arduino IDE and the code compiled. Doh! - Not sure what is up with that. But it's late here and I'll take it for tonight.