_Installing wxPerl on Snow Leopard (works also for 64bit processors)_
Last modified on : 27.09.2009
I needed to run wxPerl on my new Macbook Pro with 64bit capable processor. wxWidgets doesn't support 64bit so I needed to compile everything in 32bit. Here comes how...
Fire up a Terminal and do the following: (you might prefer to create a temporary directory for doing all this)
Start with installing perl in 32bit
Download the current perl.tar.gz from perl.com.
wget http://www.cpan.org/src/perl-5.10.1.tar.gzexplode the archive and move into the created directory
tar -xvzf perl-5.10.1.tar.gz cd perl-5.10.1specify the SDK you wish to compile perl against (this is not really needed)
export SDK=/Developer/SDKs/MacOSX10.6.sdkConfigure the build instructions
./Configure -Dcc="gcc -m32" -Dprefix=/usr/local -Uloclibpth -Dlibpth=/usr/lib -Accflags="-arch i386 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include" -Aldflags="-arch i386 -L/usr/local/lib" -Alddlflags="-arch i386 -bundle -undefined dynamic_lookup -L/usr/local/lib" -dBuild and test
make make testinstall perl as superuser
sudo make installuse the newly installed perl by default: Add /usr/local/bin to the PATH
Use your favorite editor to edit $HOME/.profile. Then add this line to the bottom of the file :
PATH=/usr/local/bin:$PATH
Now build wxWidgets
- Download wxwidgets 2.8.10: Open this link in your browser: http://prdownloads.sourceforge.net/wxwindows/wxWidgets-2.8.10.tar.gz
explode and move into directory
tar -xvzf wxWidgets-2.8.10.tar.gz cd wxWidgets-2.8.10Configure the build instructions
arch_flags="-arch i386" ./configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags"Build and test
make make testinstall wxWidgets as superuser
sudo make install
Install stc
While still in the wx source directory, go to contrib/src/stc subdirectory
Compile and install
make make test sudo make install
Then install Alien::wxWidgets
Get the archive
wget http://search.cpan.org/CPAN/authors/id/M/MB/MBARBON/Alien-wxWidgets-0.44.tar.gzexplode and move into directory
tar -xvzf Alien-wxWidgets-0.44.tar.gz cd Alien-wxWidgets-0.44Configure the build instructions
perl Build.PLanswer 'no' when asking to refetch and install wxWidgets
Build and test
perl Build perl Build testinstall as superuser
sudo perl Build install
install Wx from cpan
only one step for this ;)
sudo cpan Wx
_wxGrid cell attributes_
Last modified on : 21.07.2008
wxGrid is a terrific widget. It allows to use images and show data in grid format any way you'd like. i.e. you can modify the background of a row each two rows. What you need to configure this and other behaviour are cell attributes.
First you have to create a Wx::GridCellAttr and set cell attributes you want. Then you tell your grid to apply the setting by allocating the new style to i.e. a row by using SetRowAttr.
