next up previous contents index
Next: 2.6 SDCC on Other Up: 2. Installation Previous: 2.4 Install Trouble-shooting   Contents   Index

Subsections

2.5 Additional Information for Windows Users

<pending: is this up to date?>

The standard method of installing on a Unix system involves compiling the source package. This is easily done under Unix, but under Windows it can be a more difficult process. The Cygwin is a large package to download, and the compilation runs considerably slower under Windows due to the overhead of the Cygwin tool set. An alternative is to install a pre-compiled Windows binary package. There are various trade-offs between each of these methods.

The Cygwin package allows a Windows user to run a Unix command line interface (bash shell) and also implements a Unix like file system on top of Windows. Included are many of the famous GNU software development tools which can augment the SDCC compiler.This is great if you have some experience with Unix command line tools and file system conventions, if not you may find it easier to start by installing a binary Windows package. The binary packages work with the Windows file system conventions.

2.5.1 Getting started with Cygwin

SDCC is typically distributed as a tarred/gzipped file (.tgz). This is a packed file similar to a .zip file. Cygwin includes the tools you will need to unpack the SDCC distribution (tar and gzip). To unpack it, simply follow the instructions under the Linux/Unix install section. Before you do this you need to learn how to start a cygwin shell and some of the basic commands used to move files, change directory, run commands and so on. The change directory command is ``cd'', the move command is ``mv''. To print the current working directory, type ``pwd''. To make a directory, use ``mkdir''.

There are some basic differences between Unix and Windows file systems you should understand. When you type in directory paths, Unix and the Cygwin bash prompt uses forward slashes '/' between directories while Windows traditionally uses '\' backward slashes. So when you work at the Cygwin bash prompt, you will need to use the forward '/' slashes. Unix does not have a concept of drive letters, such as ``c:``, instead all files systems attach and appear as directories.

2.5.2 Running SDCC as Native Compiled Executables

If you use the pre-compiled binaries, the install directories for the libraries and header files may need to be specified on the sdcc command line like this: "sdcc -L c:\usr\local\sdcc\lib\small -I c:\usr\local\sdcc\include test.c" if you are running outside of a Unix bash shell.

If you have successfully installed and compiled SDCC with the Cygwin package, it is possible to compile into native .exe files by using the additional makefiles included for this purpose. For example, with the Borland 32-bit compiler you would run "make -f Makefile.bcc". A command line version of the Borland 32-bit compiler can be downloaded from the Inprise web site.


next up previous contents index
Next: 2.6 SDCC on Other Up: 2. Installation Previous: 2.4 Install Trouble-shooting   Contents   Index
Johan Knol
2001-07-13