Author Topic: undefined reference to xxxx issue for wxwidget  (Read 5844 times)

Offline thundercrawl

  • Single posting newcomer
  • *
  • Posts: 8
undefined reference to xxxx issue for wxwidget
« on: November 16, 2010, 11:02:03 am »
Hi,

Sorry to post here .

D:\DengYC\Projects\EHProxy\EHProxyMain.cpp|69|undefined reference to `vtable for ShapedFrame'|

I used the shaped sample code, and create a new shaped frame in my main frame, that have an error about the reference...

I amnot sure why that point to the constructor of the shapedFrame...

here the class declaration part.. in the main frame .h file..

Code
class ShapedFrame : public wxFrame
{
public:
    // ctor(s)
    ShapedFrame(wxFrame *parent);



private:
    bool     m_hasShape;
    wxBitmap m_bmp;
    wxPoint  m_delta;

    // any class wishing to process wxWidgets events must use this macro
    DECLARE_EVENT_TABLE()
};

in the main frame .cpp file ,that have been initiated.. but there a reference error to that constructor??

Code

ShapedFrame::ShapedFrame(wxFrame *parent)
       : wxFrame(parent, wxID_ANY, wxEmptyString,
                  wxDefaultPosition, wxSize(100, 100),
                  0| wxFRAME_SHAPED
                  | wxSIMPLE_BORDER
                  | wxFRAME_NO_TASKBAR
                  | wxSTAY_ON_TOP)
{

   wxBitmap m_bmp = wxBitmap(wxT("..\\..\\..\\projects\\crossPlatformC\\res\\icons\\protection.png"), wxBITMAP_TYPE_PNG);
    SetSize(wxSize(m_bmp.GetWidth(), m_bmp.GetHeight()));
    SetToolTip(wxT("Right-click to close"));

}


Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: undefined reference to xxxx issue for wxwidget
« Reply #1 on: November 16, 2010, 11:19:15 am »
This is the subtitle of theis board:
Quote
Code::Blocks installation/troubleshooting issues. This is NOT a general programming board.

Why do you think this is Code::Blocks related and not just a configuration error ?

Offline cxwshawn

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: undefined reference to xxxx issue for wxwidget
« Reply #2 on: November 16, 2010, 11:24:31 am »
Hi,

Sorry to post here .

D:\DengYC\Projects\EHProxy\EHProxyMain.cpp|69|undefined reference to `vtable for ShapedFrame'|

I used the shaped sample code, and create a new shaped frame in my main frame, that have an error about the reference...

I amnot sure why that point to the constructor of the shapedFrame...

here the class declaration part.. in the main frame .h file..

Code
class ShapedFrame : public wxFrame
{
public:
    // ctor(s)
    ShapedFrame(wxFrame *parent);



private:
    bool     m_hasShape;
    wxBitmap m_bmp;
    wxPoint  m_delta;

    // any class wishing to process wxWidgets events must use this macro
    DECLARE_EVENT_TABLE()
};

in the main frame .cpp file ,that have been initiated.. but there a reference error to that constructor??

Code

ShapedFrame::ShapedFrame(wxFrame *parent)
       : wxFrame(parent, wxID_ANY, wxEmptyString,
                  wxDefaultPosition, wxSize(100, 100),
                  0| wxFRAME_SHAPED
                  | wxSIMPLE_BORDER
                  | wxFRAME_NO_TASKBAR
                  | wxSTAY_ON_TOP)
{

   wxBitmap m_bmp = wxBitmap(wxT("..\\..\\..\\projects\\crossPlatformC\\res\\icons\\protection.png"), wxBITMAP_TYPE_PNG);
    SetSize(wxSize(m_bmp.GetWidth(), m_bmp.GetHeight()));
    SetToolTip(wxT("Right-click to close"));

}


I don't think the inheritance implementation ways is right ~~~

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: undefined reference to xxxx issue for wxwidget
« Reply #3 on: November 16, 2010, 11:30:32 am »
Why don't you answer my question ?

This is the subtitle of theis board:
Quote
Code::Blocks installation/troubleshooting issues. This is NOT a general programming board.

Why do you think this is Code::Blocks related and not just a configuration error ?

Offline thundercrawl

  • Single posting newcomer
  • *
  • Posts: 8
Re: undefined reference to xxxx issue for wxwidget
« Reply #4 on: November 16, 2010, 11:39:31 am »
I have check the configuration, no idea about this.

If that bother you as "not related to C:B", you can delete this topic...

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: undefined reference to xxxx issue for wxwidget
« Reply #5 on: November 16, 2010, 11:44:06 am »
I have check the configuration, no idea about this.

If that bother you as "not related to C:B", you can delete this topic...
Just locked !