Subj : Trying to set up a Response table for a dervied thread class but not working... To : borland.public.cpp.borlandcpp From : Antsy Date : Fri Jun 04 2004 03:25 pm Hi I have an application that launches a thread. This thread then goes off and do what its suppose to do. The code listing is at the bottom of the page for completeness of this posting. The compilation error I am getting is: Error:thread_foo.cpp(15,53):Undefined symbol 'Find' basically what i am trying to do with the thread is to have it respond to a windows event. Every time this event occurs the response table in the thread should pick it up and run the associated function in the thread. The class is derived from TThread and TWindow. I included TWindow so I can use the RESPONSE_TABLE macros. But as the error above shows I am going wrong somewhere. Basically what I want to happen is that when this thread is launched it defines an event to listen for and when that event occurs "function_foo" is run. Where am I going wrong. //CLASS DEFINITION //----------------- #if !defined(foo_h) #define foo_h #include class TThreadFoo : public TWindow, TThread { public: TThreadFoo(TWindow* parent); ~TThreadFoo(); TWindow* par; private: int Run(); void LoadFooLibrary(HANDLE* g_foo); LRESULT foo_function(WPARAM wParam, LPARAM lParam); HANDLE g_foo; UINT USMSG_FOO_EVENT; //{{TTFoo_TBL_Begin}} protected: DECLARE_RESPONSE_TABLE(TTFoo); }; #endif //CLASS IMPLEMENTATION //-------------------- #include #include "thread_foo.h" DEFINE_RESPONSE_TABLE2(TThreadFoo, TWindow, TThread) //{{TThreadFoo_TBL_BEGIN}} EV_REGISTERED("USMSG_FOO_EVENT", foo_function), //{{TThreadFoo_TBL_END}} END_RESPONSE_TABLE; TThreadFoo::TThreadFoo(TWindow *parent) : TWindow, TThread() { par = parent; USMSG_FOO_EVENT = 0; LoadFOOLibrary(&g_foo); if (g_foo) { USMSG_FOO_EVENT = RegisterWindowMessage("USMSG_FOO_EVENT"); } } TThreadFoo::~TThreadFoo() { if (g_foo) { FreeLibrary((HMODULE)g_foo); } } TThreadFoo::Run() { MessageBox("Hi there.", "Nonsense", MB_OK); return 0L; } void TThreadFoo::LoadFooLibrary(HANDLE* g_foo) { } LRESULT TThreadFoo::foo_function(WPARAM wParam, LPARAM lParam) { if (g_foo) { MessageBox("Hi there.", "Nonsense", MB_OK); } } .