wx-config: Command not found.
wx-config: Command not found.
HelloWorldApp.cpp:3:10: fatal error: 'wx/wxprec.h' file not found
#include <wx/wxprec.h>
^~~~~~~~~~~~~
1 error generated.
Then I get:
clang++ HelloWorldApp.cpp `wxgtk2u-2.8-config --libs` `wxgtk2u-2.8-config --cxxflags` -o HelloWorldApp
HelloWorldApp.cpp:25:1: error: unknown type name 'wxIMPLEMENT_APP'
wxIMPLEMENT_APP(MyApp);
^
HelloWorldApp.cpp:33:11: error: no matching constructor for initialization of 'wxFrame'
: wxFrame(NULL, wxID_ANY, "Hello World")
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/wx-2.8/wx/gtk/frame.h:33:5: note: candidate constructor not viable: no known
conversion from 'const char [12]' to 'const wxString' for 3rd argument
wxFrame(wxWindow *parent,
^
/usr/local/include/wx-2.8/wx/gtk/frame.h:28:24: note: candidate constructor
(the implicit copy constructor) not viable: requires 1 argument, but 3 were provided
class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase
^
/usr/local/include/wx-2.8/wx/gtk/frame.h:32:5: note: candidate constructor not viable: requires 0
arguments, but 3 were provided
wxFrame() { Init(); }
^
HelloWorldApp.cpp:36:15: error: no matching member function for call to 'Append'
menuFile->Append(ID_Hello, "&Hello...\tCtrl-H",
~~~~~~~~~~^~~~~~
/usr/local/include/wx-2.8/wx/menu.h:62:17: note: candidate function not viable: no known
conversion from 'const char [17]' to 'const wxString' for 2nd argument
wxMenuItem* Append(int itemid,
^
/usr/local/include/wx-2.8/wx/menu.h:312:17: note: candidate function not viable: no known
conversion from 'const char [17]' to 'const wxString' for 2nd argument
wxMenuItem* Append(int itemid,
^
/usr/local/include/wx-2.8/wx/menu.h:303:10: note: candidate function not viable: requires 4
arguments, but 3 were provided
void Append(int itemid,
^
/usr/local/include/wx-2.8/wx/menu.h:99:17: note: candidate function not viable: requires single
argument 'item', but 3 arguments were provided
wxMenuItem* Append(wxMenuItem *item) { return DoAppend(item); }
^
HelloWorldApp.cpp:43:32: error: reference to type 'const wxString' could not bind to an lvalue of
type 'const char [6]'
menuBar->Append( menuFile, "&File" );
^~~~~~~
/usr/local/include/wx-2.8/wx/gtk/menu.h:27:56: note: passing argument to parameter 'title' here
virtual bool Append( wxMenu *menu, const wxString &title );
^
HelloWorldApp.cpp:44:32: error: reference to type 'const wxString' could not bind to an lvalue of
type 'const char [6]'
menuBar->Append( menuHelp, "&Help" );
^~~~~~~
/usr/local/include/wx-2.8/wx/gtk/menu.h:27:56: note: passing argument to parameter 'title' here
virtual bool Append( wxMenu *menu, const wxString &title );
^
HelloWorldApp.cpp:47:20: error: reference to type 'const wxString' could not bind to an lvalue of
type 'const char [22]'
SetStatusText( "Welcome to wxWidgets!" );
^~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/wx-2.8/wx/frame.h:110:48: note: passing argument to parameter 'text' here
virtual void SetStatusText(const wxString &text, int number = 0);
^
HelloWorldApp.cpp:48:10: error: use of undeclared identifier 'wxEVT_MENU'
Bind(wxEVT_MENU, &MyFrame::OnHello, this, ID_Hello);
^
HelloWorldApp.cpp:49:10: error: use of undeclared identifier 'wxEVT_MENU'
Bind(wxEVT_MENU, &MyFrame::OnAbout, this, wxID_ABOUT);
^
HelloWorldApp.cpp:50:10: error: use of undeclared identifier 'wxEVT_MENU'
Bind(wxEVT_MENU, &MyFrame::OnExit, this, wxID_EXIT);
^
HelloWorldApp.cpp:58:5: error: no matching function for call to 'wxMessageBox'
wxMessageBox( "This is a wxWidgets' Hello world sample",
^~~~~~~~~~~~
/usr/local/include/wx-2.8/wx/msgdlg.h:70:17: note: candidate function not viable: no known
conversion from 'const char [40]' to 'const wxString' for 1st argument
int WXDLLEXPORT wxMessageBox(const wxString& message,
^
HelloWorldApp.cpp:63:5: error: no matching function for call to 'wxLogMessage'
wxLogMessage("Hello world from wxWidgets!");
^~~~~~~~~~~~
/usr/local/include/wx-2.8/wx/log.h:546:1: note: candidate function not viable: no known
conversion from 'const char [28]' to 'const wxChar *' (aka 'const wchar_t *') for 1st
argument
DECLARE_LOG_FUNCTION(Message);
^
/usr/local/include/wx-2.8/wx/log.h:494:30: note: expanded from macro 'DECLARE_LOG_FUNCTION'
extern void WXDLLIMPEXP_BASE wxLog##level(const wxChar *szFormat, \
^
<scratch space>:209:1: note: expanded from here
wxLogMessage
^
11 errors generated.
HelloWorldApp.cpp:25:1: error: unknown type name 'wxIMPLEMENT_APP'
wxIMPLEMENT_APP(MyApp);
^
HelloWorldApp.cpp:33:11: error: no matching constructor for initialization of 'wxFrame'
: wxFrame(NULL, wxID_ANY, "Hello World")
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/wx-2.8/wx/gtk/frame.h:33:5: note: candidate constructor not viable: no known
conversion from 'const char [12]' to 'const wxString' for 3rd argument
wxFrame(wxWindow *parent,
^
/usr/local/include/wx-2.8/wx/gtk/frame.h:28:24: note: candidate constructor
(the implicit copy constructor) not viable: requires 1 argument, but 3 were provided
class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase
^
/usr/local/include/wx-2.8/wx/gtk/frame.h:32:5: note: candidate constructor not viable: requires 0
arguments, but 3 were provided
wxFrame() { Init(); }
^
HelloWorldApp.cpp:36:15: error: no matching member function for call to 'Append'
menuFile->Append(ID_Hello, "&Hello...\tCtrl-H",
~~~~~~~~~~^~~~~~
/usr/local/include/wx-2.8/wx/menu.h:62:17: note: candidate function not viable: no known
conversion from 'const char [17]' to 'const wxString' for 2nd argument
wxMenuItem* Append(int itemid,
^
/usr/local/include/wx-2.8/wx/menu.h:312:17: note: candidate function not viable: no known
conversion from 'const char [17]' to 'const wxString' for 2nd argument
wxMenuItem* Append(int itemid,
^
/usr/local/include/wx-2.8/wx/menu.h:303:10: note: candidate function not viable: requires 4
arguments, but 3 were provided
void Append(int itemid,
^
/usr/local/include/wx-2.8/wx/menu.h:99:17: note: candidate function not viable: requires single
argument 'item', but 3 arguments were provided
wxMenuItem* Append(wxMenuItem *item) { return DoAppend(item); }
^
HelloWorldApp.cpp:43:32: error: reference to type 'const wxString' could not bind to an lvalue of
type 'const char [6]'
menuBar->Append( menuFile, "&File" );
^~~~~~~
/usr/local/include/wx-2.8/wx/gtk/menu.h:27:56: note: passing argument to parameter 'title' here
virtual bool Append( wxMenu *menu, const wxString &title );
^
HelloWorldApp.cpp:44:32: error: reference to type 'const wxString' could not bind to an lvalue of
type 'const char [6]'
menuBar->Append( menuHelp, "&Help" );
^~~~~~~
/usr/local/include/wx-2.8/wx/gtk/menu.h:27:56: note: passing argument to parameter 'title' here
virtual bool Append( wxMenu *menu, const wxString &title );
^
HelloWorldApp.cpp:47:20: error: reference to type 'const wxString' could not bind to an lvalue of
type 'const char [22]'
SetStatusText( "Welcome to wxWidgets!" );
^~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/wx-2.8/wx/frame.h:110:48: note: passing argument to parameter 'text' here
virtual void SetStatusText(const wxString &text, int number = 0);
^
HelloWorldApp.cpp:48:10: error: use of undeclared identifier 'wxEVT_MENU'
Bind(wxEVT_MENU, &MyFrame::OnHello, this, ID_Hello);
^
HelloWorldApp.cpp:49:10: error: use of undeclared identifier 'wxEVT_MENU'
Bind(wxEVT_MENU, &MyFrame::OnAbout, this, wxID_ABOUT);
^
HelloWorldApp.cpp:50:10: error: use of undeclared identifier 'wxEVT_MENU'
Bind(wxEVT_MENU, &MyFrame::OnExit, this, wxID_EXIT);
^
HelloWorldApp.cpp:58:5: error: no matching function for call to 'wxMessageBox'
wxMessageBox( "This is a wxWidgets' Hello world sample",
^~~~~~~~~~~~
/usr/local/include/wx-2.8/wx/msgdlg.h:70:17: note: candidate function not viable: no known
conversion from 'const char [40]' to 'const wxString' for 1st argument
int WXDLLEXPORT wxMessageBox(const wxString& message,
^
HelloWorldApp.cpp:63:5: error: no matching function for call to 'wxLogMessage'
wxLogMessage("Hello world from wxWidgets!");
^~~~~~~~~~~~
/usr/local/include/wx-2.8/wx/log.h:546:1: note: candidate function not viable: no known
conversion from 'const char [28]' to 'const wxChar *' (aka 'const wchar_t *') for 1st
argument
DECLARE_LOG_FUNCTION(Message);
^
/usr/local/include/wx-2.8/wx/log.h:494:30: note: expanded from macro 'DECLARE_LOG_FUNCTION'
extern void WXDLLIMPEXP_BASE wxLog##level(const wxChar *szFormat, \
^
<scratch space>:209:1: note: expanded from here
wxLogMessage
^
11 errors generated.
I installed wx30-gtk2 and still got these messages. wx28-gtk2 was already installed.