Getting Started

Intro | MinGW with Code::Blocks setup | Your First Program

Adding PDCurses | Adding Allegro

So you’re ready to start programming. Great. But don’t think you can just jump into the deep end. You’re going to need to start with simpler programs first like Hello.

However, if you are using a windows based computer it isn’t set up yet for you to write programs yet, so the first thing you’ll need to do is install a compiler. Also, you may want an IDE, or Integrated Development Environment to help you. All of the programs on this website are written in C/C++. There are several C/C++ compilers and IDEs to choose from. Cymon’s Games recommends MinGW with Code::Blocks.

Introduction

Updated almost daily, Code::Blocks is a development environment that works well with the MinGW C/C++ compiler, which means you’ll actually be loading two programs.

Initial Setup

Code::Blocks maintains binary released that include both Code::Blocks and MinGW in one package with a neat little installer, which is everything you’ll need.

To help you get started I’ve built you a short video tutorial:

To install Code::Blocks:

  1. Go to http://www.codeblocks.org, click on downloads then download the latest binary release with MinGW.
  2. Run the downloaded package.
  3. Click Next then click I Agree.
  4. On the next screen you can choose optional packages to install. Which ones you pick are up to you. Click Next when ready.
  5. Remove the “Program Files\” from the install directory and leave just “C:\CodeBlocks”
  6. Click Install and wait for the installation to finish.
  7. When the installation is run Code::Blocks.

Making your First Program

Once MinGW and Code::Blocks is install you’re ready to start programming. It is best practice to always use a project so to finish of we’ll start you on your first project.

Picking up in the video where the instructions left off:

  1. Click File->New->Project
  2. Select the Console Application button (Console Application Button )
  3. Press Next. You should see a screen like the one below:
  4. New Project Window

  5. Fill out the fields like so:
    • Project Name: Hello
    • Folder to Create Project in: Select your “My Documents” directory or a specific subdirectory of your choosing.
  6. Press Next. Don’t worry about any of the settings you’re now looking at for the moment and press Next again.
  7. Make sure you’ve selected the appropriate language (C in this case) and press Next.
  8. In the window on the left expand the Sources branch and double-click on the main.c file.
  9. main.c

  10. In the main window is where you will type your programs. There is a default “hello world” program there already that you can use.
  11. When you are ready press the build and run button (Build and Run button)to run your first program!

I’m not using Windows XP!

These instructions are designed for windows systems and tested in XP. If you aren’t running XP and can’t figure out how to set up your system please contact me and we’ll try to work it out.

Share and Enjoy:
  • StumbleUpon
  • Google
  • del.icio.us
  • Facebook
  • Digg
  • Slashdot
  • Fark
  • Live
  • Spurl
  • TwitThis
  • E-mail this story to a friend!
  • Reddit

Support Cymon's Games

Recent Comments

Search

Sponsored Links

Cymon's Amazon Store