Error implementing created TObject class

Running OSX 10.9.2, root v5-34-08

I have made a simple detector class with member values of length, width, and height. I can neither implement it into another library, nor load it in root.

If I try to implement it into another library and declare a variable of type “Detector” as follows, I get the following error:

If I try to load the class in a root session via:

gSystem->Load(".libs/libDircObjs.dylib")

I get the following error

Update: I installed the latest root and updated xcode and x11 and the class can now be called from within a root session but when trying to call it inside a function I still receive the following error:

[quote]Undefined symbols for architecture x86_64:
“vtable for Detector”, referenced from:
_main in main.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [generator] Error 1[/quote]

The code for the detector class is:

#ifndef __DIRC_OBJECTS__
#define __DIRC_OBJECTS__

#include <vector>
#include "TObject.h"
#include "TNamed.h"
#include "TVector3.h"


class Detector : public TObject
{
public:
  Detector(float l = 0., float w = 0., float h = 0.) : Length(l), Width(w), Height(h), CriticalAngle(0.), IncidentX(0.), IncidentY(0.), IncidentTheta(0.), IncidentPhi(0.) {}
  ~Detector(){};

  float Length;
  float Width;
  float Height;
  float CriticalAngle;
  float IncidentX;
  float IncidentY;
  float IncidentTheta;
  float IncidentPhi;
  
  ClassDef(Detector, 1);

};

#endif