In diesem Video zeige ich, wie man wxWidgets mit Hilfe von Homebrew auf macOS installieren kann.

Eine kurze Zusammenfassung:
1 2 3 | brew install wxwidgets brew install dylibbundler |
So sieht es dann aus:

Hier noch der Programmcode zum Testen:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include <wx/wx.h> class MyApp : public wxApp { public : bool OnInit(); }; class MyFrame : public wxFrame { public : MyFrame(); }; IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { MyFrame *myFrame = new MyFrame; myFrame->Show(); SetTopWindow(myFrame); return true ; } MyFrame::MyFrame() : wxFrame( nullptr , wxID_ANY, "Meine wx-App" ) { wxStaticText *staticText = new wxStaticText( this , wxID_ANY, "Hello World" ); } |
Kompiliert wird das ganze via:
1 | c++ *.cpp -o mywxapp -std=c++11 ` /usr/local/Cellar/wxwidgets/3 .2.0_1 /bin/wx-config --libs --cppflags` |
Wer wxWidgets auf macOS selbst kompilieren möchte, findet hier eine Anleitung.