Codeblock Guid
Codeblock Guid
Codeblock Guid
Programming can be a difficult field to get into. For those looking to breakthrough, the first step on the
path to learning programming starts with making what is called a Hello, World program, a program
that simply displays the text “Hello World” to the computer screen. This guide will show you how to
create this program, using the programming language C, a widely used programing language. The
guide will help you get through the process of writing this first program through four distinct steps:
1.) First, you will download an application on your computer called Code::Blocks, which you will
use to create the code for the program.
2.) Next, you will install the Code::Blocks software on your machine.
3.) Then, you will create a project in Code::Blocks to hold your first program.
4.) Finally, you will build and run the project that holds the code for the “Hello World” program.
□ You have prior experience navigating a computer and installing downloading software.
► It is assumed that you are aware of how to: install programs, navigate files, and use an internet
browser to download files. If you are unsure of how to perform any of these tasks; consider
looking at sources at your local bookstore on basic computer functionality.
□ You meet all the technical requirements necessary to install the Code::Blocks software.
► The system should have Windows 7/8 for the operating system.
You will be able to use any Windows operating system from Windows XP on, along with any
Linux or Mac OS distribution, but the guide assumes the use of Windows 7 or 8.
► The system should have at least 250 MBs of free hard-drive space.
This space is required to hold install Code::Blocks on the system.
► Ensure that you have administrative privileges for the system you will be writing the program on.
If not, check with your local system administrator about installing software on the computer.
Troubleshooting: If the application does not download from either of these links, please
check that you do not have a pop-blocked turned on, nor do you have any other program
stopping downloads from the internet. This can vary depending on system setup.
Installing Code::Blocks
After finishing downloading the Code::Blocks software, you must now install it on the local computer
system.
1. Navigate to the location that you have
downloaded the executable to. This should
be the normal location for downloads on a
Windows 7 or Windows 8 environment.
Troubleshooting: If you see a warning, note that this action will make a change to the
system. Simply click “Yes”. This allows the software to be installed on your system.
Troubleshooting: This installation will require at least 250 MBs of space on the system the
software will be installed on. Ensure that there is sufficient space for this on the computer
system.
8. Once the IDE installs you will see a screen listing complier auto-detection. Double check that the GNU
GCC Compiler is detected. If it is selected, press OK to continue.
Your First C Program 4
9. Next you will see the options for file associations of C/C++ source files. If you plan to continue
programming and using the particular IDE, then select the Yes, associate Code::Blocks with C/C++
file types. If not, then simply select No, leave everything as it is.
Troubleshooting: If you are not the administrator for the computer you are performing the
installation on, please check with the appropriate authority before changing the file-type
association of the system.
Troubleshooting: If you are having trouble building the code. Please check that that PATH
system variable on your system was correctly setup during installation. Information on this can
be found by searching PATH environment variable online. It should point to C:\Program Files
(x86)\CodeBlocks\MinGW\libexec\gcc\mingw32\4.7.1 if you used the default installation
settings.
Congratulations! You have successfully created your first C program. Now with the IDE setup and
your first program created, you are now ready to venture further into the world of programming. There
are many sources for C-related programming guides, and with a simple search can find many that
can start you on a path to building more powerful and creative programs.
Your First C Program 8