Here are some instructions on compling wxWidgets (ex wxWindows) for Apple Mac OSX Snow Leopard. To begin, download wxMac, decompress it, open a terminal and navigate to the base wxMac directory.
mkdir osx_build cd osx_buildYou will most probably want to have OpenGL support with wxWidgets, so remember the "--with-opengl" flag. As with most projects, the 64bit support on OSX is flaky, so it is best to compile for 32bit using "-arch i386". Hopefully this won't be necessary in the near future.
../configure --with-opengl CFLAGS="-arch i386" CXXFLAGS="-arch i386" CPPFLAGS="-arch i386" LDFLAGS="-arch i386" OBJCFLAGS="-arch i386" OBJCXXFLAGS="-arch i386"(Note: other handy options are: --with-cocoa, --disable-shared --enable-static, --enable-unicode, --enable-debug. At present Cocoa support is dubious, again, this may change in future.)
(you may wish to confirm that opengl canvas is enabled - see:
/usr/lib/wx/include/mac-unicode-debug-2.8/wx/setup.h)
makeYou should have a lib directory with all the dylib's in it.
Unfortunately, for wx to work, you will need to install it.
sudo make install make samplesThis should generate a whole bunch of samples in the osx_build/samples directory
Now you can run the samples! (Note: the samples can not be run from the command line, you need to run the applications, otherwise the program will not gain focus and you won't be able to click on any of the buttons!)
No comments:
Post a Comment