I won't bother on Windows as I could compile it there anyway.
On Mac I did what you said, except there is no controls.h, and I had to either change the include in the renamed controls.cpp to "controls.h", or keep the original name of reset.h.
Code: Select all
Mac-mini:resetAudacity gale$ make
/Users/gale/Downloads/wxMac-2.8.12/bk-deps g++ -c -o controls_controls.o -D__WXMAC__ -I. -DWXUSINGDLL -I./../../samples -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I/Users/gale/Downloads/wxMac-2.8.12/lib/wx/include/mac-ansi-release-2.8 -I../../include -fpascal-strings -I../../src/mac/carbon/morefilex -I/Developer/Headers/FlatCarbon -DWX_PRECOMP -Wall -Wundef -Wno-ctor-dtor-privacy -O2 -fno-strict-aliasing -fno-common ./controls.cpp
./controls.cpp:25:25: warning: extra tokens at end of #include directive [-Wextra-tokens]
#include <wx/fileconf.h>F
^
//
./controls.cpp:36:10: error: expected "FILENAME" or <FILENAME>
#include “reset.h”
^
./controls.cpp:38:19: error: use of undeclared identifier 'MyFrame'; did you mean 'wxFrame'?
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
^~~~~~~
wxFrame
../../include/wx/event.h:2721:24: note: expanded from macro 'BEGIN_EVENT_TABLE'
const wxEventTable theClass::sm_eventTable =
^
../../include/wx/mac/carbon/menu.h:15:19: note: 'wxFrame' declared here
class WXDLLEXPORT wxFrame;
^
./controls.cpp:38:19: error: use of undeclared identifier 'MyFrame'; did you mean 'wxFrame'?
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
^~~~~~~
wxFrame
../../include/wx/event.h:2722:39: note: expanded from macro 'BEGIN_EVENT_TABLE'
{ &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] };
^
../../include/wx/mac/carbon/menu.h:15:19: note: 'wxFrame' declared here
class WXDLLEXPORT wxFrame;
^
./controls.cpp:38:19: error: use of undeclared identifier 'MyFrame'; did you mean 'wxFrame'?
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
^~~~~~~
wxFrame
../../include/wx/event.h:2723:25: note: expanded from macro 'BEGIN_EVENT_TABLE'
const wxEventTable *theClass::GetEventTable() const
^
../../include/wx/mac/carbon/menu.h:15:19: note: 'wxFrame' declared here
class WXDLLEXPORT wxFrame;
^
./controls.cpp:38:19: error: use of undeclared identifier 'MyFrame'; did you mean 'wxFrame'?
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
^~~~~~~
wxFrame
../../include/wx/event.h:2724:19: note: expanded from macro 'BEGIN_EVENT_TABLE'
{ return &theClass::sm_eventTable; }
^
../../include/wx/mac/carbon/menu.h:15:19: note: 'wxFrame' declared here
class WXDLLEXPORT wxFrame;
^
./controls.cpp:38:19: error: use of undeclared identifier 'MyFrame'; did you mean 'wxFrame'?
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
^~~~~~~
wxFrame
../../include/wx/event.h:2725:22: note: expanded from macro 'BEGIN_EVENT_TABLE'
wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable);
^
../../include/wx/mac/carbon/menu.h:15:19: note: 'wxFrame' declared here
class WXDLLEXPORT wxFrame;
^
./controls.cpp:38:19: error: use of undeclared identifier 'MyFrame'; did you mean 'wxFrame'?
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
^~~~~~~
wxFrame
../../include/wx/event.h:2725:50: note: expanded from macro 'BEGIN_EVENT_TABLE'
wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable);
^
../../include/wx/mac/carbon/menu.h:15:19: note: 'wxFrame' declared here
class WXDLLEXPORT wxFrame;
^
./controls.cpp:38:19: error: use of undeclared identifier 'MyFrame'; did you mean 'wxFrame'?
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
^~~~~~~
wxFrame
../../include/wx/event.h:2726:23: note: expanded from macro 'BEGIN_EVENT_TABLE'
wxEventHashTable &theClass::GetEventHashTable() const
^
../../include/wx/mac/carbon/menu.h:15:19: note: 'wxFrame' declared here
class WXDLLEXPORT wxFrame;
^
./controls.cpp:38:19: error: use of undeclared identifier 'MyFrame'; did you mean 'wxFrame'?
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
^~~~~~~
wxFrame
../../include/wx/event.h:2727:18: note: expanded from macro 'BEGIN_EVENT_TABLE'
{ return theClass::sm_eventHashTable; }
^
../../include/wx/mac/carbon/menu.h:15:19: note: 'wxFrame' declared here
class WXDLLEXPORT wxFrame;
^
./controls.cpp:38:19: error: use of undeclared identifier 'MyFrame'; did you mean 'wxFrame'?
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
^~~~~~~
wxFrame
../../include/wx/event.h:2728:29: note: expanded from macro 'BEGIN_EVENT_TABLE'
const wxEventTableEntry theClass::sm_eventTableEntries[] = {
^
../../include/wx/mac/carbon/menu.h:15:19: note: 'wxFrame' declared here
class WXDLLEXPORT wxFrame;
^
./controls.cpp:39:15: error: use of undeclared identifier 'ID_GLOBALRESETALL'
EVT_BUTTON(ID_GLOBALRESETALL, MyFrame::OnResetAll)
^
../../include/wx/event.h:3031:82: note: expanded from macro 'EVT_BUTTON'
# define EVT_BUTTON(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_BUTTON_CLICKED, winid, wxCommandEventHandler(func))
^
../../include/wx/event.h:2851:27: note: expanded from macro 'wx__DECLARE_EVT1'
wx__DECLARE_EVT2(evt, id, wxID_ANY, fn)
^
../../include/wx/event.h:2849:36: note: expanded from macro 'wx__DECLARE_EVT2'
DECLARE_EVENT_TABLE_ENTRY(evt, id1, id2, fn, NULL),
^
../../include/wx/event.h:96:29: note: expanded from macro 'DECLARE_EVENT_TABLE_ENTRY'
wxEventTableEntry(type, winid, idLast, fn, obj)
^
./controls.cpp:40:15: error: use of undeclared identifier 'ID_GLOBALRESETBASE'
EVT_BUTTON(ID_GLOBALRESETBASE, MyFrame::OnResetBase)
^
../../include/wx/event.h:3031:82: note: expanded from macro 'EVT_BUTTON'
# define EVT_BUTTON(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_BUTTON_CLICKED, winid, wxCommandEventHandler(func))
^
../../include/wx/event.h:2851:27: note: expanded from macro 'wx__DECLARE_EVT1'
wx__DECLARE_EVT2(evt, id, wxID_ANY, fn)
^
../../include/wx/event.h:2849:36: note: expanded from macro 'wx__DECLARE_EVT2'
DECLARE_EVENT_TABLE_ENTRY(evt, id1, id2, fn, NULL),
^
../../include/wx/event.h:96:29: note: expanded from macro 'DECLARE_EVENT_TABLE_ENTRY'
wxEventTableEntry(type, winid, idLast, fn, obj)
^
./controls.cpp:41:15: error: use of undeclared identifier 'ID_GLOBALRESETPLUGIN'
EVT_BUTTON(ID_GLOBALRESETPLUGIN, MyFrame::OnResetPlugin)
^
../../include/wx/event.h:3031:82: note: expanded from macro 'EVT_BUTTON'
# define EVT_BUTTON(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_BUTTON_CLICKED, winid, wxCommandEventHandler(func))
^
../../include/wx/event.h:2851:27: note: expanded from macro 'wx__DECLARE_EVT1'
wx__DECLARE_EVT2(evt, id, wxID_ANY, fn)
^
../../include/wx/event.h:2849:36: note: expanded from macro 'wx__DECLARE_EVT2'
DECLARE_EVENT_TABLE_ENTRY(evt, id1, id2, fn, NULL),
^
../../include/wx/event.h:96:29: note: expanded from macro 'DECLARE_EVENT_TABLE_ENTRY'
wxEventTableEntry(type, winid, idLast, fn, obj)
^
./controls.cpp:42:24: error: use of undeclared identifier 'MyFrame'; did you mean 'wxFrame'?
EVT_MENU(wxID_EXIT, MyFrame::OnQuit)
^~~~~~~
wxFrame
../../include/wx/event.h:3026:106: note: expanded from macro 'EVT_MENU'
#define EVT_MENU(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_MENU_SELECTED, winid, wxCommandEventHandler(func))
^
../../include/wx/event.h:2627:88: note: expanded from macro 'wxCommandEventHandler'
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCommandEventFunction, &func)
^
../../include/wx/event.h:52:59: note: expanded from macro 'wxStaticCastEvent'
#define wxStaticCastEvent(type, val) wx_static_cast(type, val)
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
../../include/wx/event.h:2851:41: note: expanded from macro 'wx__DECLARE_EVT1'
wx__DECLARE_EVT2(evt, id, wxID_ANY, fn)
^
../../include/wx/event.h:2849:46: note: expanded from macro 'wx__DECLARE_EVT2'
DECLARE_EVENT_TABLE_ENTRY(evt, id1, id2, fn, NULL),
^
../../include/wx/event.h:96:44: note: expanded from macro 'DECLARE_EVENT_TABLE_ENTRY'
wxEventTableEntry(type, winid, idLast, fn, obj)
^
../../include/wx/mac/carbon/menu.h:15:19: note: 'wxFrame' declared here
class WXDLLEXPORT wxFrame;
^
./controls.cpp:42:33: error: no member named 'OnQuit' in 'wxFrame'
EVT_MENU(wxID_EXIT, MyFrame::OnQuit)
~~~~~~~~~^
../../include/wx/event.h:3026:106: note: expanded from macro 'EVT_MENU'
#define EVT_MENU(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_MENU_SELECTED, winid, wxCommandEventHandler(func))
^
../../include/wx/event.h:2627:88: note: expanded from macro 'wxCommandEventHandler'
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCommandEventFunction, &func)
^
../../include/wx/event.h:52:59: note: expanded from macro 'wxStaticCastEvent'
#define wxStaticCastEvent(type, val) wx_static_cast(type, val)
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
../../include/wx/event.h:2851:41: note: expanded from macro 'wx__DECLARE_EVT1'
wx__DECLARE_EVT2(evt, id, wxID_ANY, fn)
^
../../include/wx/event.h:2849:46: note: expanded from macro 'wx__DECLARE_EVT2'
DECLARE_EVENT_TABLE_ENTRY(evt, id1, id2, fn, NULL),
^
../../include/wx/event.h:96:44: note: expanded from macro 'DECLARE_EVENT_TABLE_ENTRY'
wxEventTableEntry(type, winid, idLast, fn, obj)
^
./controls.cpp:43:25: error: use of undeclared identifier 'MyFrame'; did you mean 'wxFrame'?
EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
^~~~~~~
wxFrame
../../include/wx/event.h:3026:106: note: expanded from macro 'EVT_MENU'
#define EVT_MENU(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_MENU_SELECTED, winid, wxCommandEventHandler(func))
^
../../include/wx/event.h:2627:88: note: expanded from macro 'wxCommandEventHandler'
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCommandEventFunction, &func)
^
../../include/wx/event.h:52:59: note: expanded from macro 'wxStaticCastEvent'
#define wxStaticCastEvent(type, val) wx_static_cast(type, val)
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
../../include/wx/event.h:2851:41: note: expanded from macro 'wx__DECLARE_EVT1'
wx__DECLARE_EVT2(evt, id, wxID_ANY, fn)
^
../../include/wx/event.h:2849:46: note: expanded from macro 'wx__DECLARE_EVT2'
DECLARE_EVENT_TABLE_ENTRY(evt, id1, id2, fn, NULL),
^
../../include/wx/event.h:96:44: note: expanded from macro 'DECLARE_EVENT_TABLE_ENTRY'
wxEventTableEntry(type, winid, idLast, fn, obj)
^
../../include/wx/mac/carbon/menu.h:15:19: note: 'wxFrame' declared here
class WXDLLEXPORT wxFrame;
^
./controls.cpp:43:34: error: no member named 'OnAbout' in 'wxFrame'
EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
~~~~~~~~~^
../../include/wx/event.h:3026:106: note: expanded from macro 'EVT_MENU'
#define EVT_MENU(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_MENU_SELECTED, winid, wxCommandEventHandler(func))
^
../../include/wx/event.h:2627:88: note: expanded from macro 'wxCommandEventHandler'
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCommandEventFunction, &func)
^
../../include/wx/event.h:52:59: note: expanded from macro 'wxStaticCastEvent'
#define wxStaticCastEvent(type, val) wx_static_cast(type, val)
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
../../include/wx/event.h:2851:41: note: expanded from macro 'wx__DECLARE_EVT1'
wx__DECLARE_EVT2(evt, id, wxID_ANY, fn)
^
../../include/wx/event.h:2849:46: note: expanded from macro 'wx__DECLARE_EVT2'
DECLARE_EVENT_TABLE_ENTRY(evt, id1, id2, fn, NULL),
^
../../include/wx/event.h:96:44: note: expanded from macro 'DECLARE_EVENT_TABLE_ENTRY'
wxEventTableEntry(type, winid, idLast, fn, obj)
^
./controls.cpp:46:15: error: unknown type name 'MyApp'
IMPLEMENT_APP(MyApp)
^
../../include/wx/app.h:688:29: note: expanded from macro 'IMPLEMENT_APP'
IMPLEMENT_APP_NO_THEMES(appname)
^
../../include/wx/app.h:682:27: note: expanded from macro 'IMPLEMENT_APP_NO_THEMES'
IMPLEMENT_APP_NO_MAIN(appname)
^
../../include/wx/app.h:672:20: note: expanded from macro 'IMPLEMENT_APP_NO_MAIN'
return new appname;
^
./controls.cpp:46:15: error: unknown type name 'MyApp'
../../include/wx/app.h:688:29: note: expanded from macro 'IMPLEMENT_APP'
IMPLEMENT_APP_NO_THEMES(appname)
^
../../include/wx/app.h:682:27: note: expanded from macro 'IMPLEMENT_APP_NO_THEMES'
IMPLEMENT_APP_NO_MAIN(appname)
^
../../include/wx/app.h:676:17: note: expanded from macro 'IMPLEMENT_APP_NO_MAIN'
DECLARE_APP(appname)
^
../../include/wx/app.h:698:37: note: expanded from macro 'DECLARE_APP'
#define DECLARE_APP(appname) extern appname& wxGetApp();
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make: *** [controls_controls.o] Error 1