Вы находитесь на странице: 1из 5

Tutorial v1

by R. Kummer, and F. Aubert

How to install Eclipse, CDT and OpenGL


[Eclipse – C++ CDT Plugin – OpenGL]
under Windows XP
Instructions
1) Install Eclipse, http://www.eclipse.org/downloads/index.php
2) Install Cygwin, http://www.cygwin.com
a) Install Now
b) Validate default values (agree to all) and click Next
c) Select and click Next
✔ Devel->gcc-core
✔ Devel->gcc-g++
✔ Devel->make
✔ Graphics->opengl

15/11/2005 1
Tutorial v1
by R. Kummer, and F. Aubert

3) Install Eclipse CDT Plugin, in Eclipse,


a) Choose Help->Software Updates->Find and Install...
b) Choose Search for new feature to install
c) Add New Remote Site, with URL:
http://download.eclipse.org/tools/cdt/releases/eclipse3.1

15/11/2005 2
Tutorial v1
by R. Kummer, and F. Aubert

e) Select latest CDT Plugin (here CDT 3.0.1) and click Finish

f) Select All and click Next


g) Validate default values (agree to all) and click Finish
h) On validation screen, click Install All

15/11/2005 3
Tutorial v1
by R. Kummer, and F. Aubert

4) Modify Environment Variable Path


a) Right click on My Computer, choose Properties
b) On Advanced tab, choose Environment Variables
c) Select System Variables -> Path and click Edit

d) Append at the end of Variable Value: « ;C:\cygwin\bin »

5) Install GLUT, http://www.xmission.com/~nate/glut.html


a) glut32.dll goes to %WIN32DIR%\system32\
b) glut.lib goes to C:\cygwin\lib\
c) glut.h goes to C:\cygwin\usr\include\w32api\GL\

6) Test Case, in Eclipse,


a) Create A New Project, with template C++->Managed Make C++ Project
b) In Project->Properties, on C/C++ Build->GCC C++ Linker->Library, add
libs
✔ opengl32
✔ glu32
✔ glut32
c) Add code, from canvas.cpp, and Save
d) Run as Local C/C++ Application

15/11/2005 4
Tutorial v1
by R. Kummer, and F. Aubert

Notes:
– If you close a GLUT Window using the standard control (the cross button in the
upper right corner of the window), the window dissapear, but the program does not
effectively exit: use the Task Manager to effectively kill the program. Alternatively
make use of a standard callback through GLUT and map it to a call to the standard
win32 exit function (ie. keyboardFunc, with Escape Key ASCII 27). If you are
aware of any workaround, not involving callbacks, please let us know.

Authors:
– Raphael Kummer (raphael.kummer@unine.ch)
– Frederic Aubert (frederic.aubert@unine.ch)

15/11/2005 5

Вам также может понравиться