Compilers for Unix-based systems...
Compilers for Windows...
A great on-line C language reference
Unix/FreeBSD/Linux/Mac OS X
  
As was stated in the book, the gcc compiler comes with your operating system and it will work in the special directories you've set up. You're all set. You are the future.
Tip: If you're using the command line, then most command shells support a history function; you can use the up arrow key on the keyboard to recall a previously-typed command. Use this to help you quickly re-edit and re-compile.
Windows

The following information supplements what is found in Appendix A in the books. Please refer there first and then here next.
Tip: With most Command Prompt windows you can use the up arrow key on the keyboard to recall a previously-typed command. Use this to help you quickly re-edit and re-compile your stuff.
Suggested Compilers
MinGW: Minimalist GNU For Windows. A port of the GNU GCC compiler that I used for writing the books.
To download a copy of MinGW, visit this site (link opens in a new window):
http://www.mingw.org/
Click the Download link on that page. (The page is being updated as of February 2008. When it's solid, I provide more information.)
Dev-C++/Bloodshed compiler. The compiler they use with the Dev-C++ environment is the MinGW compiler. Same thing.
DJGPP. This is a custom version of the popular GNU C/C++ compiler that should also work with the books. It's been several years since I've downloaded a copy of DJGPP, but I assume that it should work well with the book. Here is the link (opens in a new window):
http://www.delorie.com/djgpp/
Other compilers.
If you know of any other compilers that are GCC-compatible or based on GCC, please do let me know. I'd be happy to list them here. Send e-mail to
dan [at) c-for-dummies.com
Text Editors
I suppose I should also mention various text editors available, especially if you're going to be using the command prompt to create your programs (as I do).
The editor I use is VIM, though it's advanced, scary, and intimidating:
VIM
Another popular editor is GNU Emacs, though it also isn't the most friendly editor in the world. For more information on the Windows version, see: http://www.gnu.org/software/emacs/windows/
Here are a few easy-to-learn and use text editors as recommended by one of my Forum contributors, Brad:
Notepad2
Notepad++
Crimson Editor
Finally, some additional recommendations, though these may not be as easy to use as the previous three:
Context
PSPad
Getting the GCC command to work in any folder
The best way to get the GCC command to work in any folder on your hard drive is to place the BIN folder (where GCC lives) onto the Windows search path. This can be complex, so pay attention!
First you need to know where the BIN folder is located, the BIN folder's path. This is the hardest part because most folks began using computers by using Windows, which doesn't emphasize paths as much as command prompt OSs do.
If you've installed MinGW according to its wonts, then the path to BIN may look like this:
C:\MinGW\bin
(This can be seen in the Address Bar if you open the BIN folder in a window.)
Or if you installed MinGW in the Program Files folder, the path may be:
C:\Program Files\MinGW\bin
Or maybe you're using another compiler and the path is something like:
C:\OtherGCC\bin
Or:
C:\Program Files\OtherGCC\bin
Whatever! Write down or memorize or copy that path. It's important. It must be accurate!
Second, you need to modify the PATH environment variable in Windows so that Windows knows where to look for GCC and its companion commands. The following sections describe how to do this for Windows Vista and Windows XP and Windows 98. (I no longer support Windows ME and do not have Windows 2000/NT workstation.)
Windows Vista & Windows XP
Vista is apparently having issues with MinGW. The installation program loses the location of a key file. Supposedly the MinGW people will address this in the near future. Until then, click here.
Open the Control Panel's System icon to see the System Properties dialog box. (In Windows Vista, click on the Advanced System Settings link to see the System Properties dialog box.)
In the System Properties dialog box, click the Advanced tab. Then click the Environment Variables button.

Choose the Path variable from the bottom part of the dialog box, shown above. Click the Edit button.

Click in the Variable value text box and press the End key on your keyboard so that you may add text to the end of path.
Type a semicolon, ;
Then type the path to the BIN folder, as in:
;c:\mingw\bin
Double-check!
Click OK to close the Edit System Variable box. Click OK to close the Environment variables box. Click OK to close the System Properties window.
The changes take affect with the next DOS prompt window you open. If you were successful, then you can run the GCC command in any folder/directory at the DOS prompt.
Windows 98
From the Start button choose the Run command.
In the Run dialog box, type msconfig:

Click OK. This displays the System Configuration Utility. Inside that window, click the Autoexec.bat tab. Then click to select the PATH line:

Click the Edit button. At the end of the existing path, add a semicolon and then the path to MinGW or your C compiler, whatever that is. For example:
;c:\mingw\bin
Double-check! Then click OK. This change will take affect after you next restart the computer; do so now if prompted.
NOTE: If you don't see a line with PATH= on it anywhere inthe scrolling window, then you'll have to create one. Click on the New button, then type:
path=c:\mingw\bin
Or specify whatever the path may be to your compilter. Save this, then restart your computer.
Any questions? E-mail me:
dan (at] c-for-dummies.com

Copyright © 1997-2008 by QPBC. All rights reserved |