EVENT_TABLE compilation error under Debian 12
Сергей Коныгин <[email protected]>
| Newsgroups | gmane.comp.lib.wxwindows.general |
|---|---|
| Message-ID | <[email protected]> |
Hi !
I'm compiling my wxWidgets project under Debian 12. There are some errors
during compilation event tables. There was no errors under any other OS.
Error log and my code presented below. wxWidgets-3.2.1 was compiled
normally.
In file included from /media/sf__shared/wx/include/wx/wx.h:24,
from ./wx_pch.h:24,
from <command-line>:
/media/sf__shared/1/AgrDlg.h:71:75: error: ISO C++ forbids taking the
address of a bound member function to form a pointer to member function.
Say вЂ˜&AgrDlg::OnOK’ [-fpermissive]
71 | EVT_BUTTON(
wxID_OK, OnOK )
|
^~~~
/media/sf__shared/wx/include/wx/event.h:87:73: note: in definition of macro
вЂ˜wxDECLARE_EVENT_TABLE_ENTRY’
87 | wxEventTableEntry(type, winid, idLast,
wxNewEventTableFunctor(type, fn), obj)
|
^~
/media/sf__shared/wx/include/wx/event.h:4499:5: note: in expansion of macro
вЂ˜wx__DECLARE_EVT2’
4499 | wx__DECLARE_EVT2(evt, id, wxID_ANY, fn)
| ^~~~~~~~~~~~~~~~
/media/sf__shared/wx/include/wx/event.h:4696:33: note: in expansion of
macro вЂ˜wx__DECLARE_EVT1’
4696 | #define EVT_BUTTON(winid, func) wx__DECLARE_EVT1(wxEVT_BUTTON,
winid, wxCommandEventHandler(func))
| ^~~~~~~~~~~~~~~~
/media/sf__shared/wx/include/wx/event.h:194:25: note: in expansion of macro
вЂ˜wxEventHandlerNoexceptCast’
194 | wxEventFunctionCast(wxEventHandlerNoexceptCast(functype, &func))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/media/sf__shared/wx/include/wx/event.h:4264:5: note: in expansion of macro
вЂ˜wxEVENT_HANDLER_CAST’
4264 | wxEVENT_HANDLER_CAST(wxCommandEventFunction, func)
| ^~~~~~~~~~~~~~~~~~~~
/media/sf__shared/wx/include/wx/event.h:4696:71: note: in expansion of
macro вЂ˜wxCommandEventHandler’
4696 | #define EVT_BUTTON(winid, func) wx__DECLARE_EVT1(wxEVT_BUTTON,
winid, wxCommandEventHandler(func))
|
^~~~~~~~~~~~~~~~~~~~~
/media/sf__shared/1/AgrDlg.h:71:9: note: in expansion of macro
вЂ˜EVT_BUTTON’
71 | EVT_BUTTON(
wxID_OK, OnOK )
| ^~~~~~~~~~
class AgrDlg : public piaDialog
{
public:
AgrDlg( wxWindow* pParent, Agr* pAgr ) : piaDialog( pParent,
pAgr->GetNodeDesc()), mpAgr( pAgr )
{
mgridData = new Grid( this );
mgridData->SetColLabelSizeInLines( 3 );
mgridData->DisableRowLabels();
mgridData->AppendCols( 3 );
mgridData->AppendRows( 3 );
wxBoxSizer* sizrRoot = new wxBoxSizer( wxVERTICAL );
sizrRoot->Add( mgridData, 0, wxALL|wxFIXED_MINSIZE, WNDMARGINS );
sizrRoot->Add( CreateOKCancelSizer( this ), 0, wxALL|wxALIGN_CENTER, WNDMARGINS
);
SetSizerAndFit( sizrRoot );
CenterOnParent();
}
void OnOK( wxCommandEvent& event )
{
EndModal( wxID_OK );
}
Grid* mgridData;
DECLARE_EVENT_TABLE()
};
BEGIN_EVENT_TABLE( AgrDlg, piaDialog )
// EVT_COMBOBOX( wxID_ANY, OnCombo )
// EVT_GRID_CMD_CELL_LEFT_DCLICK( wxID_ANY, OnGrid )
EVT_BUTTON( wxID_OK, OnOK )
END_EVENT_TABLE()
--
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
---
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wx-users/c8c17698-6169-4815-9d63-b40dc9db1e54n%40googlegroups.com.