a simple example building files for windows:
building unrar for cygwin.
The following wont work with g++ version >=4 (which is default).
You will need make and g++-3.
download source from http://www.rarlab.com/rar_add.htm
now edit makefile.unix
just before the line
# Linux using GCCinsert the line
CXX=g++-3this will override the g++ version
now type
make -f makefile.unixthen to install
make -f makefile.unix install