Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
I have a class derived from wxGridCellEditor with an overloaded BeginEdit() method. In this method I added one line, the rest is the same as in the base class.
void gsErrPropsEditor::BeginEdit(int row, int col, wxGrid* grid)
{
wxASSERT_MSG(m_control, wxT("The wxGridCellEditor must be created first!"));
wxGridCellEditorEvtHandler* evtHandler = NULL;
if (m_control)
evtHandler = wxDynamicCast(m_control->GetEventHandler(), wxGridCellEditorEvtHandler); <==== Linker error
// Don't immediately end if we get a kill focus event within BeginEdit
if (evtHandler)
evtHandler->SetInSetFocus(true);
Id = wxAtoi(grid->GetTable()->GetValue(row, col)); // Id Text aus dem Grid
Reset(); // this updates combo box to correspond to m_value
Combo()->SetFocus();
#ifdef __WXOSX_COCOA__
// This is a work around for the combobox being simply dismissed when a
// choice is made in it under OS X. The bug is almost certainly due to a
// problem in focus events generation logic but it's not obvious to fix and
// for now this at least allows to use wxGrid.
Combo()->Popup();
#endif
if (evtHandler)
{
// When dropping down the menu, a kill focus event
// happens after this point, so we can't reset the flag yet.
#if !defined(__WXGTK20__)
evtHandler->SetInSetFocus(false);
#endif
}
}
The marked line produces the above-mentioned linker error. What could be the reason? I'm using wx 3.1 and TDM-GCC 5.1.
ms_classInfo etc. is added to a class via one of the DECLARE_DYNAMIC_CLASS macros. But as you derive from wxGridCellEditor, it should already be in there.
C:\dev\wxWidgets3.1\include\wx\rtti.h|153|error: 'wxClassInfo gsErrPropsEditor::ms_classInfo' is not a static data member of 'class gsErrPropsEditor'|
That confirms my suspect, but the question remains: Why not? What flags I have to set, when I compile wxWidgets? The USE_RTTI flag is already set to 1 in the config.gcc. Are there any other settings necessary?