You are on page 1of 2

OpenGL Visual C++ 6.

0
First of all download the OpenGL fles from
http://www.xmission.com/~nate/glut.html (download glut-.!."-#in.$ip or
similar - GL%& for 'in( dll) li# and header fle - there*.
+a,e a director- called .GL. under
c:/programme/microsoft 0isual studio/0c12/include (or similar) dependent
of -our en0ironment*
3op- the OpenGL fles into the new created director-
c:/programme/microsoft 0isual studio/0c12/include/GL
3op- all 4.li# fles into c:/programme/microsoft 0isual studio/0c12/Li#
5ou#leclic, the .c fle -ou want to #uild) now the 6isual 377 en0ironment
should come up with the fle.
&r- to compile or to #uild 8ust to force that 6377 will as, -ou to ma,e a
wor,space for -ou) therefore -ou should accept with 9:;. 9ou are not a#le
to compile -et. <ut 0er- soon =*
>n the +enu of 6377 go through to -? pro8ect -? settings -? Lin, and add
(do not remo0e the others@* the following li#raries to the O#8ect/li#ar-
modules line:
glut(.li# glu(.li# opengl(.li# glaux.li#
(in most cases -ou donAt ha0e to add glaux.li# reall- =**
Bow -ou should #e a#le to run the fle@
>f -ou want to gi0e -our result to others the- will need the glut(.dll in the
same director- as the executa#le.
OpenGL Visual C++ 2010 !p"ess
>nstall 6isual 377 (CDC :xpress :dition
&his is a free 377 >5: from +icrosoft that is an excellent tool to start with)
if -ou are interested in programming on a 'indows en0ironment.
9ou can fnd 6isual 377 (CDC on the 6isual ;tudio :xpress download page
on +icrosoftAs site. >t onl- wor,s on 'indows EF and up.
>f the 5irector- C:\Program Files\Microsoft SDKs\Windows\v7.0A exists) go
to the next step) otherwise -ou need to install the 'indows ;5G for
'indows ;er0er (CC2 and .B:& Framewor, .H
&his is the eIui0alent to the 'indows ;er0er (CC ;FD Flatform ;5G that
6isual 377 (CCH users installed. >t contains the main OpenGL li#raries.
9ou can download the 'indows ;5G for 'indows ;er0er (CC2 and .B:&
Framewor, from the +icrosoft we#site.
&he installation will ta,e a little while.
>nstall the GL%& Li#raries
&hese are additional li#raries that come in hand- down the road. ;ome
code samples -ou fnd ma- use them) so > fnd it #est to 8ust ha0e them
around right oJ the #at. > downloaded the original GL%& from Bate Ko#insA
site.
Lfter downloading) un$ip them and do the following:
D. 3op- the glut.h fle into the C:\Program Files\Microsoft
SDKs\Windows\v7.0A\ncl!de\"# folder.
(. 3op- the glut(.li# fle into the C:\Program
Files\Microsoft SDKs\Windows\v7.0A\#i$ folder.
. 3op- the glut(.dll fles into the C:\Windows\s%stem&'
folder.
3reate 9our First Fro8ect
3reate a pro8ect in 6isual 377 with File () *ew () Pro+ect) choose a folder
and a name for the pro8ect and set the template as Win&' Pro+ect. 3lic,
OG.
3lic, *e,t on the following screen and -ou will #e ta,en to A--lication
Settings. 3hec, 3onsole A--lication and on .m-t% Pro+ect and then clic,
/K. 9our new pro8ect has #een created.
5eclare the dependencies for -our pro8ect.
D. 3lic, on Pro+ect () 0-ro+ect name1 Pro-erties.
(. :xpand Con2g!ration Pro-erties.
. >n the Con2g!ration dropdown) select All Con2g!rations.
M. ;elect #in3er () n-!t.
H. >n the Additional De-endencies feld) enter in glu(.Li#
OpenGL(.Li# glut(.li#. &hen clic, /K.
3reate 9our First ;ource File
Go to File () *ew () File 3hoose 4is!al C55 and then C55 2le. :nter
-our code in the source fle) remem#er to add the line:

Ninclude .GL/glut.h.
Lt the #eginning of -our fle to include the GL%& header fle.
Lfter -ou fnished creating the fle) Fress F! (or go to De$!g () 6!ild
Sol!tion* to compile it and FH (De$!g () Start De$!gging* to run it.

You might also like