SDCC Manual
next up previous contents index
 

2.4.4 Building SDCC using Cygwin and Mingw32

For building and installing a Cygwin executable follow the instructions for Linux.

On Cygwin a ''native'' Win32-binary can be built, which will not need the Cygwin-DLL. For the necessary 'configure' options see section 'configure options' or the script 'sdcc/support/scripts/sdcc_cygwin_mingw32'.

In order to install Cygwin on Windows download setup.exe from www.cygwin.com http://www.cygwin.com/. Run it, set the ''default text file type'' to ''unix'' and download/install at least the following packages. Some packages are selected by default, others will be automatically selected because of dependencies with the manually selected packages. Never deselect these packages!

  • flex
  • bison
  • gcc ; version 3.x is fine, no need to use the old 2.9x
  • binutils ; selected with gcc
  • make
  • rxvt ; a nice console, which makes life much easier under windoze (see below)
  • man ; not really needed for building SDCC, but you'll miss it sooner or later
  • less ; not really needed for building SDCC, but you'll miss it sooner or later
  • svn ; only if you use Subversion access
If you want to develop something you'll need:

  • python ; for the regression tests
  • gdb ; the gnu debugger, together with the nice GUI ''insight''
  • openssh ; to access the CF or commit changes
  • autoconf and autoconf-devel ; if you want to fight with 'configure', don't use autoconf-stable!
rxvt is a nice console with history. Replace in your cygwin.bat the line

bash --login -i 
with (one line):

rxvt -sl 1000 -fn "Lucida Console-12" -sr -cr red

     -bg black -fg white -geometry 100x65 -e bash --login

Text selected with the mouse is automatically copied to the clipboard, pasting works with shift-insert.

The other good tip is to make sure you have no //c/-style paths anywhere, use /cygdrive/c/ instead. Using // invokes a network lookup which is very slow. If you think ''cygdrive'' is too long, you can change it with e.g.

mount -s -u -c /mnt
SDCC sources use the unix line ending LF. Life is much easier, if you store the source tree on a drive which is mounted in binary mode. And use an editor which can handle LF-only line endings. Make sure not to commit files with windows line endings. The tabulator spacing used in the project is 8. Although a tabulator spacing of 8 is a sensible choice for programmers (it's a power of 2 and allows to display 8/16 bit signed variables without loosing columns) the plan is to move towards using only spaces in the source.


next up previous contents index
Next: 2.4.5 Building SDCC Using Up: 2.4 Building SDCC Previous: 2.4.3 Cross compiling SDCC   Contents   Index
2008-02-29