GLUT Setup Tutorial with Eclipse CDT on Windows

Updated:
March 6, 2007
By Paul Solt

Introduction

One of my biggest frustrations with programming in a different Integrated Development Environment (IDE) or with a programming technology, is not knowing how to get started. There's generally a list of things which need to be done and sometimes it's hard to find solid tutorials on the internet. I created this tutorial to help bridge that gap. I've outlined and linked together the different steps necessary to get started with GLUT/OpenGL and Eclipse's CDT (C/C++ Development Tooling). I will also assume that the reader has some basic understanding of Eclipse, however I don't expect too much.

GLUT (Graphics Library Utility Toolkit) is an quick way to create OpenGL applications. It's cross platform so you can port anything you create in Windows to a different operating system. GLUT will take care of window management and input for your programs. OpenGL is a C based graphics library and it is state based, so you can think of it as a switchboard.

Eclipse CDT does not come with a compiler so you will have to install one. The easiest way is to use MinGW (Minimalist GNU for Windows) and the gcc/g++ compiler. The compiler comes with the necessary header and library files for programming with OpenGL, but you will need to add several GLUT files in step 4.

3. Install the C/C++ Development Tooling (CDT)

CDT is an environment which allows you to develop in C/C++ using Eclipse. It's relatively easy to download the plug-in from inside Eclipse.

a. Go to Help -> Software Updates -> Find and Install

b. Choose "Search for New Features to Install" and click on both "Callisto Discovery Site" and "The Eclipse Project Updates"

c. Choose an "Update Site Mirror" and install any updates for Eclipse and then install "C and C++ Development" (CDT) from the Callisto Discovery site.