News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

undefined reference to xxxx issue for wxwidget

Started by thundercrawl, November 16, 2010, 11:02:03 AM

Previous topic - Next topic

thundercrawl

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..


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??



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"));

}


Jenna

This is the subtitle of theis board:
QuoteCode::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 ?

cxwshawn

Quote from: thundercrawl 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..


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??



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 ~~~

Jenna

Why don't you answer my question ?

Quote from: jens on November 16, 2010, 11:19:15 AM
This is the subtitle of theis board:
QuoteCode::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 ?

thundercrawl

I have check the configuration, no idea about this.

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

Jenna

Quote from: thundercrawl 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...
Just locked !