<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2008 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>2.4.4 Building SDCC using Cygwin and Mingw32</TITLE> <META NAME="description" CONTENT="2.4.4 Building SDCC using Cygwin and Mingw32"> <META NAME="keywords" CONTENT="sdccman"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2008"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="sdccman.css"> <LINK REL="next" HREF="node19.html"> <LINK REL="previous" HREF="node17.html"> <LINK REL="up" HREF="node14.html"> <LINK REL="next" HREF="node19.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html865" HREF="node19.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html859" HREF="node14.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html853" HREF="node17.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html861" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html863" HREF="node191.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html866" HREF="node19.html">2.4.5 Building SDCC Using</A> <B> Up:</B> <A NAME="tex2html860" HREF="node14.html">2.4 Building SDCC</A> <B> Previous:</B> <A NAME="tex2html854" HREF="node17.html">2.4.3 Cross compiling SDCC</A> <B> <A NAME="tex2html862" HREF="node1.html">Contents</A></B> <B> <A NAME="tex2html864" HREF="node191.html">Index</A></B> <BR> <BR> <!--End of Navigation Panel--> <H2><A NAME="SECTION00344000000000000000"> 2.4.4 Building SDCC using Cygwin and Mingw32</A> </H2> <P> For building and installing a Cygwin executable follow the instructions for Linux. <BR> <BR> 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'. <BR> <BR> In order to install Cygwin on Windows download setup.exe from www.cygwin.com <TT><A NAME="tex2html6" HREF="http://www.cygwin.com/">http://www.cygwin.com/</A></TT>. 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! <UL> <LI>flex </LI> <LI>bison </LI> <LI>gcc ; version 3.x is fine, no need to use the old 2.9x </LI> <LI>binutils ; selected with gcc </LI> <LI>make </LI> <LI>rxvt ; a nice console, which makes life much easier under windoze (see below) </LI> <LI>man ; not really needed for building SDCC, but you'll miss it sooner or later </LI> <LI>less ; not really needed for building SDCC, but you'll miss it sooner or later </LI> <LI>svn ; only if you use Subversion access </LI> </UL> If you want to develop something you'll need: <UL> <LI>python ; for the regression tests </LI> <LI>gdb ; the gnu debugger, together with the nice GUI ''insight'' </LI> <LI>openssh ; to access the CF or commit changes </LI> <LI>autoconf and autoconf-devel ; if you want to fight with 'configure', don't use autoconf-stable! </LI> </UL> rxvt is a nice console with history. Replace in your cygwin.bat the line <P> <DL COMPACT> <DT> <DD>bash --login -i </DD> </DL>with (one line): <P> <DL COMPACT> <DT> <DD>rxvt -sl 1000 -fn Lucida Console-12 -sr -cr red <P> -bg black -fg white -geometry 100x65 -e bash --login </DD> </DL>Text selected with the mouse is automatically copied to the clipboard, pasting works with shift-insert. <BR> <BR> 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. <P> <DL COMPACT> <DT> <DD>mount -s -u -c /mnt </DD> </DL>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<A NAME="514"></A> 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. <P> <HR> <!--Navigation Panel--> <A NAME="tex2html865" HREF="node19.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html859" HREF="node14.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html853" HREF="node17.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html861" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html863" HREF="node191.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html866" HREF="node19.html">2.4.5 Building SDCC Using</A> <B> Up:</B> <A NAME="tex2html860" HREF="node14.html">2.4 Building SDCC</A> <B> Previous:</B> <A NAME="tex2html854" HREF="node17.html">2.4.3 Cross compiling SDCC</A> <B> <A NAME="tex2html862" HREF="node1.html">Contents</A></B> <B> <A NAME="tex2html864" HREF="node191.html">Index</A></B> <!--End of Navigation Panel--> <ADDRESS> 2011-03-20 </ADDRESS> </BODY> </HTML>