You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Instructions for Compiling a C program

Download simple.c, a simple test program, by right-clicking here and selecting Save Link As. Save this file on your desktop.

Start Cygwin which provides a Linux-like environment on Windoze. Cygwin is free thanks to the open source movement ... yay, open source!.

Change directory to your desktop using the cd command as follows. Note that my username is rb88. You need to replace this with your username.

Compile simple.c uisng the gcc compiler and create the executable simple.exe.

Run simple.exe.

Note that "./" needs to precede the executable name to indicate that it is in the current folder or directory. If the program runs normally, you'll get the output "This is a native C program" written to the cygwin window.

  • No labels