I remember the XCode that came with Yosemite (OS X 10.10) still had support for c++. I've created a long time ago a tiny wxWidgets base project with only showing a wxFrame, but when you open it with newer XCode (im running now High Sierra with XCode 10) then the project loads fine and you can develope in c++, even it's not "supported" anymore. Anyway, heres the link to the base:
It contains a XCode project and a Visual Studio project (the base was for crossplattform development).
On Mac OSX to compile wxWidgets with clang, just go with terminal to the wxWidgets root directory, create a folder like "build-cocoa-clang". Change into that directory and execute
Code: Select all
../configure --with-osx --prefix /usr/local/ --disable-shared --enable-utf8 --enable-cxx11 --with-macosx-version-min=10.10 --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk --disable-debug_flag
To get this flags, just execute in wxWidgets/build-cocoa-clang --> wx-config --cxxflags and wx-config --libs and copy it to the XCode project settings.
BTW: the project contains two apps to compile, one for osx and one for crosscompiling for windows with mingw. Remove it when not needed.
Thats basically it. Everything done (including compiling) within 5 minutes.