Hi! I've implemented the statemachine pattern in AggState pasted into the bottom of this mail.. I'm getting these linker errors when trying to build the main executable. My problem is I don't really know what the errormessages mean.. Thus I can't fix the problem. Any of you guys able to help me? Or at least point me in the direction of a better discription of the errormessage, then just the errormessage. g++ -I/usr/local/include/mysql++/ -I/usr/local/include/ -I/usr/local/include/mysql/ -L/usr/local/lib -L/usr/local/lib/mysql -pthread -lqosmysql -lqosthreads -lqoslog -lqoslegacynetstuff -lqoscommon -lqosmeasuring main.cpp -o measuring /usr/local/lib/libqosmeasuring.so: undefined reference to `typeinfo for AggState' /usr/local/lib/libqosmeasuring.so: undefined reference to `vtable for AggState' *** Error code 1 Code: #ifndef _AGGSTATE_H_ #define _AGGSTATE_H_ //#include <map> #include <list> #include <set> #include <functional> #include <utility> #include <limits> #include <math.h> #include <sys/time.h> #include "Packet.h" #include "AggregationPacket.h" #include "../common/QoSTime.h" class AggState { public: AggState( std::list<AggregationPacket> *win, std::list<AggregationPacket> *buf, QoSTime &winStart, QoSTime &winEnd) : start(winStart), end(winEnd) { this->nnp = true; this->win_rdy = false; this->win = win; this->buf = buf; } virtual ~AggState() {}; /* handlePacket handles the packet, and returns the * next state.. * */ virtual AggState *handlePacket(std::list<AggregationPacket>::iterator *itPtr); virtual bool needsNextPacket() { return this->nnp; } virtual bool windowIsReady() { return this->win_rdy; } static AggState *getInitialState( std::list<AggregationPacket> *win, std::list<AggregationPacket> *buf, QoSTime &winStart, QoSTime &winEnd); protected: bool nnp; bool win_rdy; QoSTime start; QoSTime end; std::list<AggregationPacket> *win; std::list<AggregationPacket> *buf; }; class AggUpState : public AggState { public: virtual ~AggUpState() {} AggUpState(std::list<AggregationPacket> *win, std::list<AggregationPacket> *buf, QoSTime &winStart, QoSTime &winEnd) : AggState(win, buf, winStart, winEnd) { } virtual AggState *handlePacket(std::list<AggregationPacket>::iterator *itPtr); }; class AggPotUpState : public AggState { public: virtual ~AggPotUpState() {} AggPotUpState(std::list<AggregationPacket> *win, std::list<AggregationPacket> *buf, QoSTime &winStart, QoSTime &winEnd, QoSTime &goodPacketStartTime) : AggState(win, buf, winStart, winEnd), goodPacketStartTime(goodPacketStartTime) { } virtual AggState *handlePacket(std::list<AggregationPacket>::iterator *itPtr); protected: QoSTime goodPacketStartTime; }; class AggPotDownState : public AggState { public: virtual ~AggPotDownState() {} AggPotDownState(std::list<AggregationPacket> *win, std::list<AggregationPacket> *buf, QoSTime &winStart, QoSTime &winEnd, QoSTime &lossStartTime) : AggState(win, buf, winStart, winEnd), lossPacketStartTime(lossStartTime) { } virtual AggState *handlePacket(std::list<AggregationPacket>::iterator *itPtr); protected: QoSTime lossPacketStartTime; }; class AggDownState : public AggState { public: virtual ~AggDownState() {} AggDownState(std::list<AggregationPacket> *win, std::list<AggregationPacket> *buf, QoSTime &winStart, QoSTime &winEnd) : AggState(win, buf, winStart, winEnd) { } virtual AggState *handlePacket(std::list<AggregationPacket>::iterator *itPtr); }; #endif //_AGGSTATE_H_