I have 2 classes in my application: class A and class B.
in CaptureDoc.h
Expand|Select|Wrap|Line Numbers
- class CCaptureDoc : public CWinpcap
- {
- public:
- CCaptureDoc(wxFrame* capframe, CCaptureWindow* capwindow);
- void PacketHandler(struct pcap_pkthdr* pkt_header, const unsigned char* pkt_data);
- void WinpcapThreadEnded();
- bool m_capmaxperform;
- private:
- CCaptureWindow* m_capwindow;
- wxFrame* m_capframe;
- };
Expand|Select|Wrap|Line Numbers
- #include "CaptureDoc.h"
- CCaptureDoc::CCaptureDoc(wxFrame* capframe, CCaptureWindow* capwindow)
- {
- /* here some code */
- }
- void CCaptureDoc::PacketHandler(struct pcap_pkthdr* packet_header, const unsigned char* packet_data)
- {
- /* here some code */
- }
- void CCaptureDoc::WinpcapThreadEnded()
- {
- /* here some code */
- }
Expand|Select|Wrap|Line Numbers
- class CWinpcap : public wxThread, wxEvtHandler {
- /* ... code*/
- virtual void PacketHandler(struct pcap_pkthdr* pkt_header, const unsigned char* pkt_data);
- virtual void WinpcapThreadEnded();
- /* code */
- }
I need the overriden functions in the derived class to get called by the base class and do their job. Is this the right way to solve this problem. However, I get an error LNK2001: unresolved external symbol....
If it cannot be done in this way, what would another way be ?
Any help would be very appreciated :)
Thanks,
Adina