wxwidgets 2.8.12 (and Alien::wxWidgets) on OSX Lion
July 24, 2011 2 Comments
I can finally make this a short post!
I was able to combine the advice found in this post http://wiki.wxwidgets.org/Development:_wxMac and some messages from the gurus on the wxPerl mailing list to other Lion builders.
To build Alien::wxWidgets 2.8.12, as well as (and this was the crux) Wx::Scintilla, on OSX 10.7 (Lion), I’m using:
CFLAGS='-arch i386' CXXFLAGS='-arch i386' CPPFLAGS='-arch i386' LDFLAGS='-arch i386' OBJCFLAGS='-arch i386' OBJCXXFLAGS='-arch i386' perl Build* --wxWidgets-extraflags=" --with-macosx-sdk=/Developer/SDKs/MacOSX10.6.sdk --with-macosx-version-min=10.6 " --wxWidgets-build='yes' --wxWidgets-source='tar.bz2' --wxWidgets-version=2.8.12
*For simplicity I use the same environment and arguments for the ./Build.PL and ./Build step
Note a few things:
- I am using a 32 bit perl (info below) because I am using wx 2.8.12
- Thus I must include all those -arch prefixes when building (see link above)
- I set the Min version to 10.6, though I have only been able to test on 10.7
- The same flags must be used for wx-things like Wx::Scintilla – in my semi-automated build I drop into a cpanm –look to build these right now, but I hope to include them into my padre-brew.pl script shortly.