Getting Free Compilers

GCC is freely available under terms of the GNU Public License (GPL) and is included on the CD-ROM that accompanies this book. The GPL places no restrictions on what you can do with your own executables. The version that is included on the CD-ROM is version 2.95.2, the Mingw32 edition (which is short for Minimal GNU Win32.) This edition contains all the header files and import libraries for working with both text-based and GUI Windows applications. Unlike with the better-known Cygwin, with Mingw32, programs are dependent only on the standard Microsoft runtime dynamic link library (DLL) MSVCRT40.DLL and are freely distributable.

TIP

To receive updates on Mingw32, see the Mingw32 project at http://sourceforge.net/projects/mingw32. There is also an excellent mailing list you can consult if you have any trouble getting Mingw32 programs to run properly.


The installation procedure for Mingw32 is straightforward: If your install directory is c:GCC, then you add c:GCCin to the path (for example, set PATH=%PATH%;c:GCCin). With Windows 9x, you can add this path to AUTOEXEC.BAT; remember that this file can be specified for each command prompt shortcut. For Windows NT/2000, you can specify the path in the command prompt properties. After you have added the path, the command c++ is available at the command prompt.

BCC32 is free for personal use and can also be found on the CD-ROM. As with GCC, if your installation directory is c:BorlandBCC55, then you need to add c:BorlandBCC55in to the path. You also have to create two .cfg files, which tell the compiler where to find the include and library files. The compiler name at the command prompt is bcc32.

contents of bcc32.cfg
-I"c:BorlandBcc55include"
-L"c:BorlandBcc55lib"

contents of ilink32.cfg
-L"c:BorlandBcc55lib"

Quincy 2000 recognizes the GCC and BCC32 compilers automatically, as long as you give it the right directories. Under Tools, Options, you can click on the Directories tab and type, for example, c:gcc or c:orlandcc55 into the Compiler field. Quincy 2000 then locates the include and library files for you. In the Run tab, you must turn off the Use UCW checkbox if you want to use the installed compiler; this item also appears on the Tools menu.

TIP

It is very useful to have more than one compiler available; when you get mysterious error messages, it's good to have a second opinion. Therefore, you should use both compilers to get a better understanding of where your programs are going wrong.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.187.165