<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.codeblocks.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JackDawson</id>
	<title>Code::Blocks - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.codeblocks.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JackDawson"/>
	<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php/Special:Contributions/JackDawson"/>
	<updated>2026-05-10T18:23:54Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=7903</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=7903"/>
		<updated>2015-08-20T05:16:51Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 23:43, 10 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
== A little Info on Glut32 and FreeGlut ==&lt;br /&gt;
&lt;br /&gt;
The original Glut32 written by Mark Kilgard was ported over by Nate Robins. And you can get the ported Glut32 Binaries if you want to see it.&lt;br /&gt;
&lt;br /&gt;
http://www.xmission.com/~nate/glut.html&lt;br /&gt;
&lt;br /&gt;
NOTE : The latest version of the Glut32 library is 3.7.6 ( '''Dated Nov 8, 2001''' )&lt;br /&gt;
&lt;br /&gt;
This is the freeglut download links.&lt;br /&gt;
&lt;br /&gt;
http://freeglut.sourceforge.net/index.php#download&lt;br /&gt;
&lt;br /&gt;
in that link you will see the title : Prepackaged Releases and the first link takes you to the binaries to be downloaded on this link&lt;br /&gt;
&lt;br /&gt;
http://www.transmissionzero.co.uk/software/freeglut-devel/&lt;br /&gt;
&lt;br /&gt;
Its in there where you will see the MinGW download package that Is described in this tutorial.&lt;br /&gt;
( NOTE : Latest Binary release is dated '''May 11th 2013''' known as Martin Payne's Windows binaries. )&lt;br /&gt;
&lt;br /&gt;
Download freeglut 2.8.1‑1 for MinGW     --------&amp;gt;  freeglut-MinGW-2.8.1-1.mp.zip&lt;br /&gt;
&lt;br /&gt;
This was in reference to Windows and Linux packages according to their website.&lt;br /&gt;
&lt;br /&gt;
When Glut32 was ported over it stopped being updated in 2001. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
'''EDIT ( December 4th 2011 ) : Because I am constantly being asked why they cannot see the files to edit that I listed below, well keep in mind its about file extensions that are hidden. You can change your extensions to show up in your Windows Explorer ORGANIZE.  So its ORGANIZE --&amp;gt; FOLDER AND SEARCH OPTIONS --&amp;gt; VIEW ( TAb ) and then you should see where its saying to hide the file extensions. You do NOT want to hide your extensions except your protected system files. Leave those hidden.'''&lt;br /&gt;
&lt;br /&gt;
[[File:fileextensions.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Bothshouldbelookedat.jpg]]&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.8.1-1.mp.zip ] ( '''Latest stable release dated 2013''' )&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the original source code to Glut32 was never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website. You can however still play with the Ported Glut32 source code. It's latest stable release was back in 2001 though.'''&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move all of those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut and in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD or NOTEPADD ++, do Not use Microsoft word or WordPad.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''Also, this line &amp;quot;if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut32&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&amp;quot;    should now say      &amp;quot;if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=7902</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=7902"/>
		<updated>2015-08-18T16:18:10Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 23:43, 10 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
EDIT UPDATE : I made an updated tutorial on how to install freeglut without using this hack tutorial. In this tutorial I share how to install a lot of libraries.&lt;br /&gt;
'''8.8.2015'''&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=LRsDUK0azpQ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A little Info on Glut32 and FreeGlut ==&lt;br /&gt;
&lt;br /&gt;
The original Glut32 written by Mark Kilgard was ported over by Nate Robins. And you can get the ported Glut32 Binaries if you want to see it.&lt;br /&gt;
&lt;br /&gt;
http://www.xmission.com/~nate/glut.html&lt;br /&gt;
&lt;br /&gt;
NOTE : The latest version of the Glut32 library is 3.7.6 ( '''Dated Nov 8, 2001''' )&lt;br /&gt;
&lt;br /&gt;
This is the freeglut download links.&lt;br /&gt;
&lt;br /&gt;
http://freeglut.sourceforge.net/index.php#download&lt;br /&gt;
&lt;br /&gt;
in that link you will see the title : Prepackaged Releases and the first link takes you to the binaries to be downloaded on this link&lt;br /&gt;
&lt;br /&gt;
http://www.transmissionzero.co.uk/software/freeglut-devel/&lt;br /&gt;
&lt;br /&gt;
Its in there where you will see the MinGW download package that Is described in this tutorial.&lt;br /&gt;
( NOTE : Latest Binary release is dated '''May 11th 2013''' known as Martin Payne's Windows binaries. )&lt;br /&gt;
&lt;br /&gt;
Download freeglut 2.8.1‑1 for MinGW     --------&amp;gt;  freeglut-MinGW-2.8.1-1.mp.zip&lt;br /&gt;
&lt;br /&gt;
This was in reference to Windows and Linux packages according to their website.&lt;br /&gt;
&lt;br /&gt;
When Glut32 was ported over it stopped being updated in 2001. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
'''EDIT ( December 4th 2011 ) : Because I am constantly being asked why they cannot see the files to edit that I listed below, well keep in mind its about file extensions that are hidden. You can change your extensions to show up in your Windows Explorer ORGANIZE.  So its ORGANIZE --&amp;gt; FOLDER AND SEARCH OPTIONS --&amp;gt; VIEW ( TAb ) and then you should see where its saying to hide the file extensions. You do NOT want to hide your extensions except your protected system files. Leave those hidden.'''&lt;br /&gt;
&lt;br /&gt;
[[File:fileextensions.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Bothshouldbelookedat.jpg]]&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.8.1-1.mp.zip ] ( '''Latest stable release dated 2013''' )&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the original source code to Glut32 was never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website. You can however still play with the Ported Glut32 source code. It's latest stable release was back in 2001 though.'''&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move all of those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut and in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD or NOTEPADD ++, do Not use Microsoft word or WordPad.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''Also, this line &amp;quot;if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut32&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&amp;quot;    should now say      &amp;quot;if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=7901</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=7901"/>
		<updated>2015-08-18T16:17:46Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 23:43, 10 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
EDIT UPDATE : I made an updated tutorial on how to install freeglut without using this hack tutorial. In this tutorial I share how to install a lot of libraries.&lt;br /&gt;
'''8.8.2015'''&lt;br /&gt;
https://www.youtube.com/watch?v=LRsDUK0azpQ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== A little Info on Glut32 and FreeGlut ==&lt;br /&gt;
&lt;br /&gt;
The original Glut32 written by Mark Kilgard was ported over by Nate Robins. And you can get the ported Glut32 Binaries if you want to see it.&lt;br /&gt;
&lt;br /&gt;
http://www.xmission.com/~nate/glut.html&lt;br /&gt;
&lt;br /&gt;
NOTE : The latest version of the Glut32 library is 3.7.6 ( '''Dated Nov 8, 2001''' )&lt;br /&gt;
&lt;br /&gt;
This is the freeglut download links.&lt;br /&gt;
&lt;br /&gt;
http://freeglut.sourceforge.net/index.php#download&lt;br /&gt;
&lt;br /&gt;
in that link you will see the title : Prepackaged Releases and the first link takes you to the binaries to be downloaded on this link&lt;br /&gt;
&lt;br /&gt;
http://www.transmissionzero.co.uk/software/freeglut-devel/&lt;br /&gt;
&lt;br /&gt;
Its in there where you will see the MinGW download package that Is described in this tutorial.&lt;br /&gt;
( NOTE : Latest Binary release is dated '''May 11th 2013''' known as Martin Payne's Windows binaries. )&lt;br /&gt;
&lt;br /&gt;
Download freeglut 2.8.1‑1 for MinGW     --------&amp;gt;  freeglut-MinGW-2.8.1-1.mp.zip&lt;br /&gt;
&lt;br /&gt;
This was in reference to Windows and Linux packages according to their website.&lt;br /&gt;
&lt;br /&gt;
When Glut32 was ported over it stopped being updated in 2001. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
'''EDIT ( December 4th 2011 ) : Because I am constantly being asked why they cannot see the files to edit that I listed below, well keep in mind its about file extensions that are hidden. You can change your extensions to show up in your Windows Explorer ORGANIZE.  So its ORGANIZE --&amp;gt; FOLDER AND SEARCH OPTIONS --&amp;gt; VIEW ( TAb ) and then you should see where its saying to hide the file extensions. You do NOT want to hide your extensions except your protected system files. Leave those hidden.'''&lt;br /&gt;
&lt;br /&gt;
[[File:fileextensions.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Bothshouldbelookedat.jpg]]&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.8.1-1.mp.zip ] ( '''Latest stable release dated 2013''' )&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the original source code to Glut32 was never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website. You can however still play with the Ported Glut32 source code. It's latest stable release was back in 2001 though.'''&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move all of those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut and in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD or NOTEPADD ++, do Not use Microsoft word or WordPad.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''Also, this line &amp;quot;if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut32&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&amp;quot;    should now say      &amp;quot;if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=User:JackDawson&amp;diff=7894</id>
		<title>User:JackDawson</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=User:JackDawson&amp;diff=7894"/>
		<updated>2015-07-21T02:42:52Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Using FreeGlut with Code::Blocks]]&lt;br /&gt;
&lt;br /&gt;
My real name is John Mieske.&lt;br /&gt;
&lt;br /&gt;
My aliases are JackDawson and janequorzar as well as TheKnoxxGamer ( Youtube ).&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=User:JackDawson&amp;diff=7893</id>
		<title>User:JackDawson</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=User:JackDawson&amp;diff=7893"/>
		<updated>2015-07-21T02:42:22Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Using FreeGlut with Code::Blocks]]&lt;br /&gt;
&lt;br /&gt;
My real name is John Mieske.&lt;br /&gt;
&lt;br /&gt;
My aliases are JackDawson and janequorzar as well as The Knoxx Gamer.&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=7049</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=7049"/>
		<updated>2011-12-04T22:12:03Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: /* Operating System Info */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 23:43, 10 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
== A little Info on Glut32 and FreeGlut ==&lt;br /&gt;
&lt;br /&gt;
The original Glut32 written by Mark Kilgard was ported over by Nate Robins. And you can get the ported Glut32 Binaries if you want to see it.&lt;br /&gt;
&lt;br /&gt;
http://www.xmission.com/~nate/glut.html&lt;br /&gt;
&lt;br /&gt;
NOTE : The latest version of the Glut32 library is 3.7.6 ( '''Dated Nov 8, 2001''' )&lt;br /&gt;
&lt;br /&gt;
This is the freeglut download links.&lt;br /&gt;
&lt;br /&gt;
http://freeglut.sourceforge.net/index.php#download&lt;br /&gt;
&lt;br /&gt;
in that link you will see the title : Prepackaged Releases and the first link takes you to the binaries to be downloaded on this link&lt;br /&gt;
&lt;br /&gt;
http://www.transmissionzero.co.uk/software/freeglut-devel/&lt;br /&gt;
&lt;br /&gt;
Its in there where you will see the MinGW download package that Is described in this tutorial.&lt;br /&gt;
( NOTE : Latest Binary release is dated '''January 23rd 2010''' known as Martin Payne's Windows binaries. )&lt;br /&gt;
&lt;br /&gt;
Download freeglut 2.6.0‑3 for MinGW     --------&amp;gt;  freeglut-MinGW.zip&lt;br /&gt;
&lt;br /&gt;
This was in reference to Windows and Linux packages according to their website.&lt;br /&gt;
&lt;br /&gt;
When Glut32 was ported over it stopped being updated in 2001. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
'''EDIT ( December 4th 2011 ) : Because I am constantly being asked why they cannot see the files to edit that I listed below, well keep in mind its about file extensions that are hidden. You can change your extensions to show up in your Windows Explorer ORGANIZE.  So its ORGANIZE --&amp;gt; FOLDER AND SEARCH OPTIONS --&amp;gt; VIEW ( TAb ) and then you should see where its saying to hide the file extensions. You do NOT want to hide your extensions except your protected system files. Leave those hidden.'''&lt;br /&gt;
&lt;br /&gt;
[[File:fileextensions.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Bothshouldbelookedat.jpg]]&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW.zip ] ( '''Latest stable release dated 2010''' )&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the original source code to Glut32 was never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website. You can however still play with the Ported Glut32 source code. It's latest stable release was back in 2001 though.'''&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move all of those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut and in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD or NOTEPADD ++, do Not use Microsoft word or WordPad.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=7048</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=7048"/>
		<updated>2011-12-04T22:11:46Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: /* Operating System Info */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 23:43, 10 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
== A little Info on Glut32 and FreeGlut ==&lt;br /&gt;
&lt;br /&gt;
The original Glut32 written by Mark Kilgard was ported over by Nate Robins. And you can get the ported Glut32 Binaries if you want to see it.&lt;br /&gt;
&lt;br /&gt;
http://www.xmission.com/~nate/glut.html&lt;br /&gt;
&lt;br /&gt;
NOTE : The latest version of the Glut32 library is 3.7.6 ( '''Dated Nov 8, 2001''' )&lt;br /&gt;
&lt;br /&gt;
This is the freeglut download links.&lt;br /&gt;
&lt;br /&gt;
http://freeglut.sourceforge.net/index.php#download&lt;br /&gt;
&lt;br /&gt;
in that link you will see the title : Prepackaged Releases and the first link takes you to the binaries to be downloaded on this link&lt;br /&gt;
&lt;br /&gt;
http://www.transmissionzero.co.uk/software/freeglut-devel/&lt;br /&gt;
&lt;br /&gt;
Its in there where you will see the MinGW download package that Is described in this tutorial.&lt;br /&gt;
( NOTE : Latest Binary release is dated '''January 23rd 2010''' known as Martin Payne's Windows binaries. )&lt;br /&gt;
&lt;br /&gt;
Download freeglut 2.6.0‑3 for MinGW     --------&amp;gt;  freeglut-MinGW.zip&lt;br /&gt;
&lt;br /&gt;
This was in reference to Windows and Linux packages according to their website.&lt;br /&gt;
&lt;br /&gt;
When Glut32 was ported over it stopped being updated in 2001. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
'''EDIT ( December 4th 2011 ) : Because I am constantly being asked why they cannot see the files to edit that I listed below, well keep in mind its about file extensions that are hidden. You can change your extensions to show up in your Windows Explorer ORGANIZE.  So its ORGANIZE --&amp;gt; FOLDER AND SEARCH OPTIONS --&amp;gt; VIEW ( TAb ) and then you should see where its saying to hide the file extensions. You do NOT want to hide your extensions except your protected system files. Leave those hidden.'''&lt;br /&gt;
&lt;br /&gt;
[[File:fileextensions.jpg|800px]]&lt;br /&gt;
&lt;br /&gt;
[[File:Bothshouldbelookedat.jpg|800px]]&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW.zip ] ( '''Latest stable release dated 2010''' )&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the original source code to Glut32 was never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website. You can however still play with the Ported Glut32 source code. It's latest stable release was back in 2001 though.'''&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move all of those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut and in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD or NOTEPADD ++, do Not use Microsoft word or WordPad.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=File:Bothshouldbelookedat.jpg&amp;diff=7047</id>
		<title>File:Bothshouldbelookedat.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=File:Bothshouldbelookedat.jpg&amp;diff=7047"/>
		<updated>2011-12-04T22:10:11Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: These are what you need to use to fix the hidden files problem.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These are what you need to use to fix the hidden files problem.&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=7046</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=7046"/>
		<updated>2011-12-04T22:02:42Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: /* Operating System Info */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 23:43, 10 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
== A little Info on Glut32 and FreeGlut ==&lt;br /&gt;
&lt;br /&gt;
The original Glut32 written by Mark Kilgard was ported over by Nate Robins. And you can get the ported Glut32 Binaries if you want to see it.&lt;br /&gt;
&lt;br /&gt;
http://www.xmission.com/~nate/glut.html&lt;br /&gt;
&lt;br /&gt;
NOTE : The latest version of the Glut32 library is 3.7.6 ( '''Dated Nov 8, 2001''' )&lt;br /&gt;
&lt;br /&gt;
This is the freeglut download links.&lt;br /&gt;
&lt;br /&gt;
http://freeglut.sourceforge.net/index.php#download&lt;br /&gt;
&lt;br /&gt;
in that link you will see the title : Prepackaged Releases and the first link takes you to the binaries to be downloaded on this link&lt;br /&gt;
&lt;br /&gt;
http://www.transmissionzero.co.uk/software/freeglut-devel/&lt;br /&gt;
&lt;br /&gt;
Its in there where you will see the MinGW download package that Is described in this tutorial.&lt;br /&gt;
( NOTE : Latest Binary release is dated '''January 23rd 2010''' known as Martin Payne's Windows binaries. )&lt;br /&gt;
&lt;br /&gt;
Download freeglut 2.6.0‑3 for MinGW     --------&amp;gt;  freeglut-MinGW.zip&lt;br /&gt;
&lt;br /&gt;
This was in reference to Windows and Linux packages according to their website.&lt;br /&gt;
&lt;br /&gt;
When Glut32 was ported over it stopped being updated in 2001. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
'''EDIT ( December 4th 2011 ) : Because I am constantly being asked why they cannot see the files to edit that I listed below, well keep in mind its about file extensions that are hidden. You can change your extensions to show up in your Windows Explorer ORGANIZE.  So its ORGANIZE --&amp;gt; FOLDER AND SEARCH OPTIONS --&amp;gt; VIEW ( TAb ) and then you should see where its saying to hide the file extensions. You do NOT want to hide your extensions except your protected system files. Leave those hidden.'''&lt;br /&gt;
&lt;br /&gt;
[[File:fileextensions.jpg]]&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW.zip ] ( '''Latest stable release dated 2010''' )&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the original source code to Glut32 was never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website. You can however still play with the Ported Glut32 source code. It's latest stable release was back in 2001 though.'''&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move all of those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut and in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD or NOTEPADD ++, do Not use Microsoft word or WordPad.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=File:Fileextensions.jpg&amp;diff=7045</id>
		<title>File:Fileextensions.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=File:Fileextensions.jpg&amp;diff=7045"/>
		<updated>2011-12-04T22:01:40Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: This is where a lot of people can click to get to windows Vista / 7 folder options.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is where a lot of people can click to get to windows Vista / 7 folder options.&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=7044</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=7044"/>
		<updated>2011-12-04T21:52:53Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: /* Operating System Info */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 23:43, 10 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
== A little Info on Glut32 and FreeGlut ==&lt;br /&gt;
&lt;br /&gt;
The original Glut32 written by Mark Kilgard was ported over by Nate Robins. And you can get the ported Glut32 Binaries if you want to see it.&lt;br /&gt;
&lt;br /&gt;
http://www.xmission.com/~nate/glut.html&lt;br /&gt;
&lt;br /&gt;
NOTE : The latest version of the Glut32 library is 3.7.6 ( '''Dated Nov 8, 2001''' )&lt;br /&gt;
&lt;br /&gt;
This is the freeglut download links.&lt;br /&gt;
&lt;br /&gt;
http://freeglut.sourceforge.net/index.php#download&lt;br /&gt;
&lt;br /&gt;
in that link you will see the title : Prepackaged Releases and the first link takes you to the binaries to be downloaded on this link&lt;br /&gt;
&lt;br /&gt;
http://www.transmissionzero.co.uk/software/freeglut-devel/&lt;br /&gt;
&lt;br /&gt;
Its in there where you will see the MinGW download package that Is described in this tutorial.&lt;br /&gt;
( NOTE : Latest Binary release is dated '''January 23rd 2010''' known as Martin Payne's Windows binaries. )&lt;br /&gt;
&lt;br /&gt;
Download freeglut 2.6.0‑3 for MinGW     --------&amp;gt;  freeglut-MinGW.zip&lt;br /&gt;
&lt;br /&gt;
This was in reference to Windows and Linux packages according to their website.&lt;br /&gt;
&lt;br /&gt;
When Glut32 was ported over it stopped being updated in 2001. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
'''EDIT ( December 4th 2011 ) : Because I am constantly being asked why they cannot see the files to edit that I listed below, well keep in mind its about file extensions that are hidden. You can change your extensions to show up in your Windows Explorer ORGANIZE.  So its ORGANIZE --&amp;gt; FOLDER AND SEARCH OPTIONS --&amp;gt; VIEW ( TAb ) and then you should see where its saying to hide the file extensions. You do NOT want to hide your extensions except your protected system files. Leave those hidden.'''&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW.zip ] ( '''Latest stable release dated 2010''' )&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the original source code to Glut32 was never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website. You can however still play with the Ported Glut32 source code. It's latest stable release was back in 2001 though.'''&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move all of those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut and in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD or NOTEPADD ++, do Not use Microsoft word or WordPad.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=7043</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=7043"/>
		<updated>2011-12-04T21:51:07Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: /* Operating System Info */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 23:43, 10 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
== A little Info on Glut32 and FreeGlut ==&lt;br /&gt;
&lt;br /&gt;
The original Glut32 written by Mark Kilgard was ported over by Nate Robins. And you can get the ported Glut32 Binaries if you want to see it.&lt;br /&gt;
&lt;br /&gt;
http://www.xmission.com/~nate/glut.html&lt;br /&gt;
&lt;br /&gt;
NOTE : The latest version of the Glut32 library is 3.7.6 ( '''Dated Nov 8, 2001''' )&lt;br /&gt;
&lt;br /&gt;
This is the freeglut download links.&lt;br /&gt;
&lt;br /&gt;
http://freeglut.sourceforge.net/index.php#download&lt;br /&gt;
&lt;br /&gt;
in that link you will see the title : Prepackaged Releases and the first link takes you to the binaries to be downloaded on this link&lt;br /&gt;
&lt;br /&gt;
http://www.transmissionzero.co.uk/software/freeglut-devel/&lt;br /&gt;
&lt;br /&gt;
Its in there where you will see the MinGW download package that Is described in this tutorial.&lt;br /&gt;
( NOTE : Latest Binary release is dated '''January 23rd 2010''' known as Martin Payne's Windows binaries. )&lt;br /&gt;
&lt;br /&gt;
Download freeglut 2.6.0‑3 for MinGW     --------&amp;gt;  freeglut-MinGW.zip&lt;br /&gt;
&lt;br /&gt;
This was in reference to Windows and Linux packages according to their website.&lt;br /&gt;
&lt;br /&gt;
When Glut32 was ported over it stopped being updated in 2001. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
'''EDIT ( December 4th 2011 ) : Because I am constantly being asked why they cannot see the files to edit that I listed below, its about extensions. You can change your extensions in the Windows Explorer ORGANIZE.  So its ORGANIZE --&amp;gt; FOLDER AND SEARCH OPTIONS --&amp;gt; VIEW ( TAb ) and then you should see where its saying to hide the file extensions. You do NOT want to hide your extensions except your protected system files. Leave those hidden.'''&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW.zip ] ( '''Latest stable release dated 2010''' )&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the original source code to Glut32 was never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website. You can however still play with the Ported Glut32 source code. It's latest stable release was back in 2001 though.'''&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move all of those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut and in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD or NOTEPADD ++, do Not use Microsoft word or WordPad.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=7042</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=7042"/>
		<updated>2011-12-04T21:48:09Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 23:43, 10 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
== A little Info on Glut32 and FreeGlut ==&lt;br /&gt;
&lt;br /&gt;
The original Glut32 written by Mark Kilgard was ported over by Nate Robins. And you can get the ported Glut32 Binaries if you want to see it.&lt;br /&gt;
&lt;br /&gt;
http://www.xmission.com/~nate/glut.html&lt;br /&gt;
&lt;br /&gt;
NOTE : The latest version of the Glut32 library is 3.7.6 ( '''Dated Nov 8, 2001''' )&lt;br /&gt;
&lt;br /&gt;
This is the freeglut download links.&lt;br /&gt;
&lt;br /&gt;
http://freeglut.sourceforge.net/index.php#download&lt;br /&gt;
&lt;br /&gt;
in that link you will see the title : Prepackaged Releases and the first link takes you to the binaries to be downloaded on this link&lt;br /&gt;
&lt;br /&gt;
http://www.transmissionzero.co.uk/software/freeglut-devel/&lt;br /&gt;
&lt;br /&gt;
Its in there where you will see the MinGW download package that Is described in this tutorial.&lt;br /&gt;
( NOTE : Latest Binary release is dated '''January 23rd 2010''' known as Martin Payne's Windows binaries. )&lt;br /&gt;
&lt;br /&gt;
Download freeglut 2.6.0‑3 for MinGW     --------&amp;gt;  freeglut-MinGW.zip&lt;br /&gt;
&lt;br /&gt;
This was in reference to Windows and Linux packages according to their website.&lt;br /&gt;
&lt;br /&gt;
When Glut32 was ported over it stopped being updated in 2001. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
EDIT ( December 4th 2011 ) : Because I am constantly being asked why they cannot see the files to edit that I listed below, its about extensions. You can change your extensions in the Windows Explorer ORGANIZE.  So its ORGANIZE --&amp;gt; FOLDER AND SEARCH OPTIONS --&amp;gt; VIEW ( TAb ) and then you should see where its saying to hide the file extensions. You do NOT want to hide your extensions except your protected system files. Leave those hidden.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW.zip ] ( '''Latest stable release dated 2010''' )&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the original source code to Glut32 was never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website. You can however still play with the Ported Glut32 source code. It's latest stable release was back in 2001 though.'''&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move all of those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut and in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD or NOTEPADD ++, do Not use Microsoft word or WordPad.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=User:JackDawson&amp;diff=6893</id>
		<title>User:JackDawson</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=User:JackDawson&amp;diff=6893"/>
		<updated>2011-09-28T04:06:44Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Using FreeGlut with Code::Blocks]]&lt;br /&gt;
&lt;br /&gt;
My real name is John Mieske.&lt;br /&gt;
&lt;br /&gt;
My aliases are JackDawson and janequorzar.&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6651</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6651"/>
		<updated>2011-07-10T21:55:20Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: /* A little Info on Glut32 and FreeGlut */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 23:43, 10 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
== A little Info on Glut32 and FreeGlut ==&lt;br /&gt;
&lt;br /&gt;
The original Glut32 written by Mark Kilgard was ported over by Nate Robins. And you can get the ported Glut32 Binaries if you want to see it.&lt;br /&gt;
&lt;br /&gt;
http://www.xmission.com/~nate/glut.html&lt;br /&gt;
&lt;br /&gt;
NOTE : The latest version of the Glut32 library is 3.7.6 ( '''Dated Nov 8, 2001''' )&lt;br /&gt;
&lt;br /&gt;
This is the freeglut download links.&lt;br /&gt;
&lt;br /&gt;
http://freeglut.sourceforge.net/index.php#download&lt;br /&gt;
&lt;br /&gt;
in that link you will see the title : Prepackaged Releases and the first link takes you to the binaries to be downloaded on this link&lt;br /&gt;
&lt;br /&gt;
http://www.transmissionzero.co.uk/software/freeglut-devel/&lt;br /&gt;
&lt;br /&gt;
Its in there where you will see the MinGW download package that Is described in this tutorial.&lt;br /&gt;
( NOTE : Latest Binary release is dated '''January 23rd 2010''' known as Martin Payne's Windows binaries. )&lt;br /&gt;
&lt;br /&gt;
Download freeglut 2.6.0‑3 for MinGW     --------&amp;gt;  freeglut-MinGW.zip&lt;br /&gt;
&lt;br /&gt;
This was in reference to Windows and Linux packages according to their website.&lt;br /&gt;
&lt;br /&gt;
When Glut32 was ported over it stopped being updated in 2001. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW.zip ] ( '''Latest stable release dated 2010''' )&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the original source code to Glut32 was never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website. You can however still play with the Ported Glut32 source code. It's latest stable release was back in 2001 though.'''&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move all of those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut and in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD or NOTEPADD ++, do Not use Microsoft word or WordPad.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6650</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6650"/>
		<updated>2011-07-10T21:54:56Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: /* A little Info on Glut32 and FreeGlut */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 23:43, 10 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
== A little Info on Glut32 and FreeGlut ==&lt;br /&gt;
&lt;br /&gt;
The original Glut32 written by Mark Kilgard was ported over by Nate Robins. And you can get the ported Glut32 Binaries if you want to see it.&lt;br /&gt;
&lt;br /&gt;
http://www.xmission.com/~nate/glut.html&lt;br /&gt;
&lt;br /&gt;
NOTE : The latest version of the Glut32 library is 3.7.6 ( '''Dated Nov 8, 2001''' )&lt;br /&gt;
&lt;br /&gt;
This is the freeglut download links.&lt;br /&gt;
&lt;br /&gt;
http://freeglut.sourceforge.net/index.php#download&lt;br /&gt;
&lt;br /&gt;
in that link you will see the title : Prepackaged Releases and the first link takes you to the binaries to be downloaded on this link&lt;br /&gt;
&lt;br /&gt;
http://www.transmissionzero.co.uk/software/freeglut-devel/&lt;br /&gt;
&lt;br /&gt;
Its in there where you will see the MinGW download package that Is described in this tutorial.&lt;br /&gt;
( NOTE : Latest Binary release is dated '''January 23rd 2010''' known as Martin Payne's Windows binaries. )&lt;br /&gt;
Download freeglut 2.6.0‑3 for MinGW     --------&amp;gt;  freeglut-MinGW.zip&lt;br /&gt;
&lt;br /&gt;
This was in reference to Windows and Linux packages according to their website.&lt;br /&gt;
&lt;br /&gt;
When Glut32 was ported over it stopped being updated in 2001. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW.zip ] ( '''Latest stable release dated 2010''' )&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the original source code to Glut32 was never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website. You can however still play with the Ported Glut32 source code. It's latest stable release was back in 2001 though.'''&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move all of those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut and in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD or NOTEPADD ++, do Not use Microsoft word or WordPad.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6649</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6649"/>
		<updated>2011-07-10T21:51:32Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: /* What You Need To Download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 23:43, 10 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
== A little Info on Glut32 and FreeGlut ==&lt;br /&gt;
&lt;br /&gt;
The original Glut32 written by Mark Kilgard was ported over by Nate Robins. And you can get the ported Glut32 Binaries if you want to see it.&lt;br /&gt;
&lt;br /&gt;
http://www.xmission.com/~nate/glut.html&lt;br /&gt;
&lt;br /&gt;
NOTE : The latest version of the Glut32 library is 3.7.6 ( '''Dated Nov 8, 2001''' )&lt;br /&gt;
&lt;br /&gt;
This is the freeglut download links.&lt;br /&gt;
&lt;br /&gt;
http://freeglut.sourceforge.net/index.php#download&lt;br /&gt;
&lt;br /&gt;
in that link you will see the title : Prepackaged Releases and the first link takes you to the binaries to be downloaded on this link&lt;br /&gt;
&lt;br /&gt;
http://www.transmissionzero.co.uk/software/freeglut-devel/&lt;br /&gt;
&lt;br /&gt;
Its in there where you will see the MinGW download package that Is described in this tutorial.&lt;br /&gt;
( NOTE : Latest Binary release is dated '''January 23rd 2010''' )&lt;br /&gt;
Download freeglut 2.6.0‑3 for MinGW     --------&amp;gt;  freeglut-MinGW.zip&lt;br /&gt;
&lt;br /&gt;
This was in reference to Windows and Linux packages according to their website.&lt;br /&gt;
&lt;br /&gt;
When Glut32 was ported over it stopped being updated in 2001. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW.zip ] ( '''Latest stable release dated 2010''' )&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the original source code to Glut32 was never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website. You can however still play with the Ported Glut32 source code. It's latest stable release was back in 2001 though.'''&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move all of those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut and in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD or NOTEPADD ++, do Not use Microsoft word or WordPad.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6648</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6648"/>
		<updated>2011-07-10T21:50:32Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: /* What You Need To Download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 23:43, 10 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
== A little Info on Glut32 and FreeGlut ==&lt;br /&gt;
&lt;br /&gt;
The original Glut32 written by Mark Kilgard was ported over by Nate Robins. And you can get the ported Glut32 Binaries if you want to see it.&lt;br /&gt;
&lt;br /&gt;
http://www.xmission.com/~nate/glut.html&lt;br /&gt;
&lt;br /&gt;
NOTE : The latest version of the Glut32 library is 3.7.6 ( '''Dated Nov 8, 2001''' )&lt;br /&gt;
&lt;br /&gt;
This is the freeglut download links.&lt;br /&gt;
&lt;br /&gt;
http://freeglut.sourceforge.net/index.php#download&lt;br /&gt;
&lt;br /&gt;
in that link you will see the title : Prepackaged Releases and the first link takes you to the binaries to be downloaded on this link&lt;br /&gt;
&lt;br /&gt;
http://www.transmissionzero.co.uk/software/freeglut-devel/&lt;br /&gt;
&lt;br /&gt;
Its in there where you will see the MinGW download package that Is described in this tutorial.&lt;br /&gt;
( NOTE : Latest Binary release is dated '''January 23rd 2010''' )&lt;br /&gt;
Download freeglut 2.6.0‑3 for MinGW     --------&amp;gt;  freeglut-MinGW.zip&lt;br /&gt;
&lt;br /&gt;
This was in reference to Windows and Linux packages according to their website.&lt;br /&gt;
&lt;br /&gt;
When Glut32 was ported over it stopped being updated in 2001. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the original source code to Glut32 was never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website. You can however still play with the Ported Glut32 source code. It's latest stable release was back in 2001 though.'''&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move all of those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut and in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD or NOTEPADD ++, do Not use Microsoft word or WordPad.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6647</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6647"/>
		<updated>2011-07-10T21:48:27Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: /* What You Need To Download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 23:43, 10 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
== A little Info on Glut32 and FreeGlut ==&lt;br /&gt;
&lt;br /&gt;
The original Glut32 written by Mark Kilgard was ported over by Nate Robins. And you can get the ported Glut32 Binaries if you want to see it.&lt;br /&gt;
&lt;br /&gt;
http://www.xmission.com/~nate/glut.html&lt;br /&gt;
&lt;br /&gt;
NOTE : The latest version of the Glut32 library is 3.7.6 ( '''Dated Nov 8, 2001''' )&lt;br /&gt;
&lt;br /&gt;
This is the freeglut download links.&lt;br /&gt;
&lt;br /&gt;
http://freeglut.sourceforge.net/index.php#download&lt;br /&gt;
&lt;br /&gt;
in that link you will see the title : Prepackaged Releases and the first link takes you to the binaries to be downloaded on this link&lt;br /&gt;
&lt;br /&gt;
http://www.transmissionzero.co.uk/software/freeglut-devel/&lt;br /&gt;
&lt;br /&gt;
Its in there where you will see the MinGW download package that Is described in this tutorial.&lt;br /&gt;
( NOTE : Latest Binary release is dated '''January 23rd 2010''' )&lt;br /&gt;
Download freeglut 2.6.0‑3 for MinGW     --------&amp;gt;  freeglut-MinGW.zip&lt;br /&gt;
&lt;br /&gt;
This was in reference to Windows and Linux packages according to their website.&lt;br /&gt;
&lt;br /&gt;
When Glut32 was ported over it stopped being updated in 2001. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move all of those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut and in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD or NOTEPADD ++, do Not use Microsoft word or WordPad.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6646</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6646"/>
		<updated>2011-07-10T21:46:48Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: /* A little Info on Glut32 and FreeGlut */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 23:43, 10 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
== A little Info on Glut32 and FreeGlut ==&lt;br /&gt;
&lt;br /&gt;
The original Glut32 written by Mark Kilgard was ported over by Nate Robins. And you can get the ported Glut32 Binaries if you want to see it.&lt;br /&gt;
&lt;br /&gt;
http://www.xmission.com/~nate/glut.html&lt;br /&gt;
&lt;br /&gt;
NOTE : The latest version of the Glut32 library is 3.7.6 ( '''Dated Nov 8, 2001''' )&lt;br /&gt;
&lt;br /&gt;
This is the freeglut download links.&lt;br /&gt;
&lt;br /&gt;
http://freeglut.sourceforge.net/index.php#download&lt;br /&gt;
&lt;br /&gt;
in that link you will see the title : Prepackaged Releases and the first link takes you to the binaries to be downloaded on this link&lt;br /&gt;
&lt;br /&gt;
http://www.transmissionzero.co.uk/software/freeglut-devel/&lt;br /&gt;
&lt;br /&gt;
Its in there where you will see the MinGW download package that Is described in this tutorial.&lt;br /&gt;
( NOTE : Latest Binary release is dated '''January 23rd 2010''' )&lt;br /&gt;
Download freeglut 2.6.0‑3 for MinGW     --------&amp;gt;  freeglut-MinGW.zip&lt;br /&gt;
&lt;br /&gt;
This was in reference to Windows and Linux packages according to their website.&lt;br /&gt;
&lt;br /&gt;
When Glut32 was ported over it stopped being updated in 2001. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move all of those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut and in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD or NOTEPADD ++, do Not use Microsoft word or WordPad.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6645</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6645"/>
		<updated>2011-07-10T21:45:40Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: /* A little Info on Glut32 and FreeGlut */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 23:43, 10 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
== A little Info on Glut32 and FreeGlut ==&lt;br /&gt;
&lt;br /&gt;
The original Glut32 written by Mark Kilgard was ported over by Nate Robins. And you can get the ported Glut32 Binaries if you want to see it.&lt;br /&gt;
&lt;br /&gt;
http://www.xmission.com/~nate/glut.html&lt;br /&gt;
&lt;br /&gt;
NOTE : The latest version of the Glut32 library is 3.7.6 ( '''Dated Nov 8, 2001''' )&lt;br /&gt;
&lt;br /&gt;
This is the freeglut download links.&lt;br /&gt;
&lt;br /&gt;
http://freeglut.sourceforge.net/index.php#download&lt;br /&gt;
&lt;br /&gt;
in that link you will see the title : Prepackaged Releases and the first link takes you to the binaries to be downloaded on this link&lt;br /&gt;
&lt;br /&gt;
http://www.transmissionzero.co.uk/software/freeglut-devel/&lt;br /&gt;
&lt;br /&gt;
Its in there where you will see the MinGW download package that I describe in the tutorial.  ( NOTE : Latest Binary release is dated '''January 23rd 2010''' )&lt;br /&gt;
Download freeglut 2.6.0‑3 for MinGW     --------&amp;gt;  freeglut-MinGW.zip&lt;br /&gt;
&lt;br /&gt;
This was in reference to Windows and Linux packages according to their website.&lt;br /&gt;
&lt;br /&gt;
When Glut32 was ported over it stopped being updated in 2001. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move all of those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut and in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD or NOTEPADD ++, do Not use Microsoft word or WordPad.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6644</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6644"/>
		<updated>2011-07-10T21:43:40Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 23:43, 10 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
== A little Info on Glut32 and FreeGlut ==&lt;br /&gt;
&lt;br /&gt;
The original Glut32 written by Mark Kilgard was ported over by Nate Robins. And you can get the ported Glut32 Binaries if you want to see it.&lt;br /&gt;
http://www.xmission.com/~nate/glut.html&lt;br /&gt;
&lt;br /&gt;
NOTE : The latest version of the Glut32 library is 3.7.6 ( [b]Dated Nov 8, 2001[/b] )&lt;br /&gt;
&lt;br /&gt;
This is the freeglut download links.&lt;br /&gt;
http://freeglut.sourceforge.net/index.php#download&lt;br /&gt;
&lt;br /&gt;
in that link you will see the title : Prepackaged Releases and the first link takes you to the binaries to be downloaded on this link&lt;br /&gt;
http://www.transmissionzero.co.uk/software/freeglut-devel/&lt;br /&gt;
&lt;br /&gt;
Its in there where you will see the MinGW download package that I describe in the tutorial.  ( NOTE : Latest Binary release is dated [b]January 23rd 2010[/b] )&lt;br /&gt;
Download freeglut 2.6.0‑3 for MinGW     --------&amp;gt;  freeglut-MinGW.zip&lt;br /&gt;
&lt;br /&gt;
This was in reference to Windows and Linux packages according to their website.&lt;br /&gt;
&lt;br /&gt;
When Glut32 was ported over it stopped being updated in 2001. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move all of those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut and in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD or NOTEPADD ++, do Not use Microsoft word or WordPad.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6643</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6643"/>
		<updated>2011-07-08T13:48:40Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 15:34, 8 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The reason for using freeGlut ==&lt;br /&gt;
&lt;br /&gt;
Glut32 is not a free library. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move all of those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut and in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD or NOTEPADD ++, do Not use Microsoft word or WordPad.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6642</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6642"/>
		<updated>2011-07-08T13:47:30Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 15:34, 8 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The reason for using freeGlut ==&lt;br /&gt;
&lt;br /&gt;
Glut32 is not a free library. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move all of those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut and in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD / NOTEPADD ++'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6641</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6641"/>
		<updated>2011-07-08T13:46:51Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 15:34, 8 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The reason for using freeGlut ==&lt;br /&gt;
&lt;br /&gt;
Glut32 is not a free library. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move all of those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut&lt;br /&gt;
 and in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD / NOTEPADD ++'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6640</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6640"/>
		<updated>2011-07-08T13:45:06Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 15:34, 8 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The reason for using freeGlut ==&lt;br /&gt;
&lt;br /&gt;
Glut32 is not a free library. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move all of those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut&lt;br /&gt;
in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD / NOTEPADD ++'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6639</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6639"/>
		<updated>2011-07-08T13:44:17Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 15:34, 8 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The reason for using freeGlut ==&lt;br /&gt;
&lt;br /&gt;
Glut32 is not a free library. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy all those files and folders into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut&lt;br /&gt;
in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD / NOTEPADD ++'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6638</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6638"/>
		<updated>2011-07-08T13:41:08Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: /* The wizard.script File */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 15:34, 8 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The reason for using freeGlut ==&lt;br /&gt;
&lt;br /&gt;
Glut32 is not a free library. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy all those files into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut&lt;br /&gt;
in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD / NOTEPADD ++'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6637</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6637"/>
		<updated>2011-07-08T13:36:17Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known by his game name as [[User:JackDawson|JackDawson]] 15:34, 8 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The reason for using freeGlut ==&lt;br /&gt;
&lt;br /&gt;
Glut32 is not a free library. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy all those files into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut&lt;br /&gt;
in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD / NOTEPADD ++'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6636</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6636"/>
		<updated>2011-07-08T13:35:16Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( Also known as [[User:JackDawson|JackDawson]] 15:34, 8 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The reason for using freeGlut ==&lt;br /&gt;
&lt;br /&gt;
Glut32 is not a free library. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy all those files into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut&lt;br /&gt;
in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD / NOTEPADD ++'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6635</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6635"/>
		<updated>2011-07-08T13:34:43Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( [[User:JackDawson|JackDawson]] 15:34, 8 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The reason for using freeGlut ==&lt;br /&gt;
&lt;br /&gt;
Glut32 is not a free library. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy all those files into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut&lt;br /&gt;
in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD / NOTEPADD ++'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6634</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6634"/>
		<updated>2011-07-08T13:34:02Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
&lt;br /&gt;
Written By John Mieske ( [[User:JackDawson|JackDawson]] 15:34, 8 July 2011 (CEST) )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The reason for using freeGlut ==&lt;br /&gt;
&lt;br /&gt;
Glut32 is not a free library. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy all those files into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut&lt;br /&gt;
in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD / NOTEPADD ++'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:JackDawson|JackDawson]] 15:09, 8 July 2011 (CEST)&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6633</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6633"/>
		<updated>2011-07-08T13:28:31Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The reason for using freeGlut ==&lt;br /&gt;
&lt;br /&gt;
Glut32 is not a free library. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made graphic software a little easier to code when it comes to programming OpenGL with 3D in mind.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy all those files into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut&lt;br /&gt;
in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD / NOTEPADD ++'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:JackDawson|JackDawson]] 15:09, 8 July 2011 (CEST)&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6632</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6632"/>
		<updated>2011-07-08T13:26:36Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: /* The reason for using freeGlut */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The reason for using freeGlut ==&lt;br /&gt;
&lt;br /&gt;
Glut32 is not a free library. So some folks decided to recreate it and named it FreeGlut. The interesting part is freeGlut and Glut32 can be installed just about the same way for Code::Blocks, with the exception that you would not have to edit the two scripts if your installing Glut32. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made using 3D a little easier when it comes to programming OpenGL.&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy all those files into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut&lt;br /&gt;
in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD / NOTEPADD ++'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:JackDawson|JackDawson]] 15:09, 8 July 2011 (CEST)&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6631</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6631"/>
		<updated>2011-07-08T13:18:41Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The reason for using freeGlut ==&lt;br /&gt;
&lt;br /&gt;
Glut32 is not a free library. So some folks decided to recreate it and named it FreeGlut. The interesting part is how you install freeglut can ALSO be used to install Glut32 for Code::Blocks, with the exception that you would not have to edit the two scripts. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made using 3D a little easier when it comes to programming OpenGL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy all those files into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now that you have copied the correct files and are ready to setup Code::Blocks, go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut&lt;br /&gt;
in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD / NOTEPADD ++'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:JackDawson|JackDawson]] 15:09, 8 July 2011 (CEST)&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6630</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6630"/>
		<updated>2011-07-08T13:11:28Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: /* Time to run the demo code from Code::Blocks itself */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The reason for using freeGlut ==&lt;br /&gt;
&lt;br /&gt;
Glut32 is not a free library. So some folks decided to recreate it and named it FreeGlut. The interesting part is how you install freeglut can ALSO be used to install Glut32 for Code::Blocks, with the exception that you would not have to edit the two scripts. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made using 3D a little easier when it comes to programming OpenGL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy all those files into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now you have copied the correct files and are ready to setup Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
So now, if you installed this on a 64Bit Windows, you should have a folder that has Program Files as a name but with the x86 on it too. Well that is where code::blocks installed too.&lt;br /&gt;
&lt;br /&gt;
So now go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut&lt;br /&gt;
&lt;br /&gt;
in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD / NOTEPADD ++'''&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:JackDawson|JackDawson]] 15:09, 8 July 2011 (CEST)&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6629</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6629"/>
		<updated>2011-07-08T13:09:37Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The reason for using freeGlut ==&lt;br /&gt;
&lt;br /&gt;
Glut32 is not a free library. So some folks decided to recreate it and named it FreeGlut. The interesting part is how you install freeglut can ALSO be used to install Glut32 for Code::Blocks, with the exception that you would not have to edit the two scripts. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made using 3D a little easier when it comes to programming OpenGL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy all those files into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now you have copied the correct files and are ready to setup Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
So now, if you installed this on a 64Bit Windows, you should have a folder that has Program Files as a name but with the x86 on it too. Well that is where code::blocks installed too.&lt;br /&gt;
&lt;br /&gt;
So now go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut&lt;br /&gt;
&lt;br /&gt;
in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD / NOTEPADD ++'''&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:JackDawson|JackDawson]] 15:09, 8 July 2011 (CEST)&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6628</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6628"/>
		<updated>2011-07-08T13:08:54Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The reason for using freeGlut ==&lt;br /&gt;
&lt;br /&gt;
Glut32 is not a free library. So some folks decided to recreate it and named it FreeGlut. The interesting part is how you install freeglut can ALSO be used to install Glut32 for Code::Blocks, with the exception that you would not have to edit the two scripts. FreeGlut and Glut32 are a set of functions for use with OpenGL. It has made using 3D a little easier when it comes to programming OpenGL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy all those files into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now you have copied the correct files and are ready to setup Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
So now, if you installed this on a 64Bit Windows, you should have a folder that has Program Files as a name but with the x86 on it too. Well that is where code::blocks installed too.&lt;br /&gt;
&lt;br /&gt;
So now go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut&lt;br /&gt;
&lt;br /&gt;
in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD / NOTEPADD ++'''&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:JackDawson|JackDawson]] 14:44, 8 July 2011 (CEST)&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6627</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6627"/>
		<updated>2011-07-08T13:03:09Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy all those files into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now you have copied the correct files and are ready to setup Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
So now, if you installed this on a 64Bit Windows, you should have a folder that has Program Files as a name but with the x86 on it too. Well that is where code::blocks installed too.&lt;br /&gt;
&lt;br /&gt;
So now go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut&lt;br /&gt;
&lt;br /&gt;
in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD / NOTEPADD ++'''&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_5.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_6.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_7.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:JackDawson|JackDawson]] 14:44, 8 July 2011 (CEST)&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=File:Freeglut_7.jpg&amp;diff=6626</id>
		<title>File:Freeglut 7.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=File:Freeglut_7.jpg&amp;diff=6626"/>
		<updated>2011-07-08T12:59:42Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: The actual code template that Code::Blocks produces for you.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The actual code template that Code::Blocks produces for you.&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=File:Freeglut_6.jpg&amp;diff=6625</id>
		<title>File:Freeglut 6.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=File:Freeglut_6.jpg&amp;diff=6625"/>
		<updated>2011-07-08T12:58:52Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: Since this is for MinGW, choose GNU GCC.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Since this is for MinGW, choose GNU GCC.&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=File:Freeglut_5.jpg&amp;diff=6624</id>
		<title>File:Freeglut 5.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=File:Freeglut_5.jpg&amp;diff=6624"/>
		<updated>2011-07-08T12:58:01Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: The Path to MinGW

( Which is where Code::Blocks with Glut needs to know where the Include folder is kept. )&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Path to MinGW&lt;br /&gt;
&lt;br /&gt;
( Which is where Code::Blocks with Glut needs to know where the Include folder is kept. )&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6623</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6623"/>
		<updated>2011-07-08T12:55:59Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy all those files into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now you have copied the correct files and are ready to setup Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
So now, if you installed this on a 64Bit Windows, you should have a folder that has Program Files as a name but with the x86 on it too. Well that is where code::blocks installed too.&lt;br /&gt;
&lt;br /&gt;
So now go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut&lt;br /&gt;
&lt;br /&gt;
in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD / NOTEPADD ++'''&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:JackDawson|JackDawson]] 14:44, 8 July 2011 (CEST)&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=File:Freeglut_4.jpg&amp;diff=6622</id>
		<title>File:Freeglut 4.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=File:Freeglut_4.jpg&amp;diff=6622"/>
		<updated>2011-07-08T12:54:48Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: Create the Glut Project.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Create the Glut Project.&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=File:Freeglut_3.jpg&amp;diff=6621</id>
		<title>File:Freeglut 3.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=File:Freeglut_3.jpg&amp;diff=6621"/>
		<updated>2011-07-08T12:54:07Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: Choosing the Glut / Glut Project option.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Choosing the Glut / Glut Project option.&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6620</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6620"/>
		<updated>2011-07-08T12:44:58Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy all those files into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now you have copied the correct files and are ready to setup Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
So now, if you installed this on a 64Bit Windows, you should have a folder that has Program Files as a name but with the x86 on it too. Well that is where code::blocks installed too.&lt;br /&gt;
&lt;br /&gt;
So now go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut&lt;br /&gt;
&lt;br /&gt;
in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD / NOTEPADD ++'''&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time to run the demo code from Code::Blocks itself ==&lt;br /&gt;
&lt;br /&gt;
Start up code::blocks and choose Create New Project and then choose Glut / Glut Project. Click next and give it a name and point to where you want the project saved too. Click next again and where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:JackDawson|JackDawson]] 14:44, 8 July 2011 (CEST)&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6619</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6619"/>
		<updated>2011-07-08T12:33:19Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy all those files into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now you have copied the correct files and are ready to setup Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
So now, if you installed this on a 64Bit Windows, you should have a folder that has Program Files as a name but with the x86 on it too. Well that is where code::blocks installed too.&lt;br /&gt;
&lt;br /&gt;
So now go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut&lt;br /&gt;
&lt;br /&gt;
in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD / NOTEPADD ++'''&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
So save those files and run code::blocks. Choose Glut. And where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. ) &lt;br /&gt;
So yea.. run the demo right out of the original Code::Blocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:JackDawson|JackDawson]] 14:33, 8 July 2011 (CEST)&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6618</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6618"/>
		<updated>2011-07-08T12:29:13Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under as well as assumes that your using Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy all those files into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the '''freeglut.dll''' file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It is easier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now you have copied the correct files and are ready to setup CodeBlocks.&lt;br /&gt;
&lt;br /&gt;
So now, if you installed this on a 64Bit Windows, you should have a folder that has Program Files as a name but with the x86 on it too. Well that is where code::blocks installed too.&lt;br /&gt;
&lt;br /&gt;
So now go to this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut&lt;br /&gt;
&lt;br /&gt;
in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
'''NOTE : USE NOTEPADD / NOTEPADD ++'''&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== The wizard.script File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' : Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== The glut.cbp File ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
So save those files and run codeblocks. Choose Glut. And where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. ) &lt;br /&gt;
So yea.. run the demo right out of the original CodeBlocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[User:JackDawson|JackDawson]] 14:09, 8 July 2011 (CEST)&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6617</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6617"/>
		<updated>2011-07-08T12:19:58Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Operating System Info ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was demonstrated to work under Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy all those files into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the freeglut.dll file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It iseasier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now you have copied the correct files and are ready to setup CodeBlocks.&lt;br /&gt;
&lt;br /&gt;
So now, if you installed this on a 64Bit Windows, you should have a folder that has Program Files as a name but with the x86 on it too. Well that is where codeblocks installed too.&lt;br /&gt;
&lt;br /&gt;
So now goto this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut&lt;br /&gt;
&lt;br /&gt;
in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
NOTE : USE NOTEPADD&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== wizard.script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== glut.cbp ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
So save those files and run codeblocks. Choose Glut. And where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. ) &lt;br /&gt;
So yea.. run the demo right out of the original CodeBlocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[User:JackDawson|JackDawson]] 14:09, 8 July 2011 (CEST)&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6616</id>
		<title>Using FreeGlut with Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks&amp;diff=6616"/>
		<updated>2011-07-08T12:16:35Z</updated>

		<summary type="html">&lt;p&gt;JackDawson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial was demonstrated to work under Microsoft Windows 7 64-Bit. However, it should work on any windows system ( as long as Code::Blocks and OpenGL are supported on that Operating System ) as well as Linux. In this tutorial you will see the path reference as the 64-Bit style of the folder ( x86 ).&lt;br /&gt;
&lt;br /&gt;
An example of what I mean is : C:\Program Files (x86)\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
On a 32-Bit Windows system you will see it as : C:\Program Files\CodeBlocks\&lt;br /&gt;
&lt;br /&gt;
Notice the ( x86 ) is missing.&lt;br /&gt;
&lt;br /&gt;
== What You Need To Download ==&lt;br /&gt;
&lt;br /&gt;
1.) [https://www.codeblocks.org Code::Blocks] You can install the default settings or check mark ALL boxes and install everything. Either way, it's up to you. I prefer to install everything just in case.&lt;br /&gt;
&lt;br /&gt;
2.) [http://www.mingw.org MinGW] ('''NOTE : This is optional''' )&lt;br /&gt;
&lt;br /&gt;
3.) [http://freeglut.sourceforge.net FreeGlut] Do NOT get the source code. GET THE BINARIES. [ Example : freeglut-MinGW-2.6.0-3.mp.zip ]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Think of freeglut as if it was the Glut32 Binaries, which the source code to Glut32 is never available since its proprietary. But once you get the GLUT demo working, you can play with the freeglut source code from their website.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you install Code::Blocks, then you can download and unzip the freeglut ZIP file, which will contain this.. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy all those files into the C:\Program Files (x86)\CodeBlocks\mingw folder. ( This is the folder where you see Include and Lib folders. This is important. ) If it asks you to overwrite folders, that's OK, say yes. It will not overwrite anything important.&lt;br /&gt;
&lt;br /&gt;
Now copy, do not move, just copy the freeglut.dll file that should currently be in your C:\Program Files (x86)\CodeBlocks\minGW folder into your C:\Windows folder. The reason to copy this into that folder is because C:\Windows is in your path, and to keep the confusion down, It iseasier to just copy it to there. You can always change it later. It would be highly advised that you add the C:\Program Files (x86)\CodeBlocks\MinGW\bin folder to your path as well.&lt;br /&gt;
&lt;br /&gt;
So now you have copied the correct files and are ready to setup CodeBlocks.&lt;br /&gt;
&lt;br /&gt;
So now, if you installed this on a 64Bit Windows, you should have a folder that has Program Files as a name but with the x86 on it too. Well that is where codeblocks installed too.&lt;br /&gt;
&lt;br /&gt;
So now goto this folder : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates\wizard\glut&lt;br /&gt;
&lt;br /&gt;
in there you will see a file named wizard.script. Its this file where it is looking for Glut32. You just simply replace any reference to Glut32 with freeglut. And it really is that simple.&lt;br /&gt;
&lt;br /&gt;
NOTE : USE NOTEPADD&lt;br /&gt;
&lt;br /&gt;
Here is what it should look like.&lt;br /&gt;
&lt;br /&gt;
== wizard.script ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
// GLUT project wizard&lt;br /&gt;
//&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
// globals&lt;br /&gt;
GlutPathDefault    &amp;lt;- _T(&amp;quot;$(#glut)&amp;quot;);&lt;br /&gt;
GlutPathDefaultInc &amp;lt;- _T(&amp;quot;$(#glut.include)&amp;quot;);&lt;br /&gt;
GlutPathDefaultLib &amp;lt;- _T(&amp;quot;$(#glut.lib)&amp;quot;);&lt;br /&gt;
GlutPath &amp;lt;- _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
function BeginWizard()&lt;br /&gt;
{&lt;br /&gt;
    local intro_msg = _T(&amp;quot;Welcome to the new GLUT project wizard!\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;This wizard will guide you to create a new project\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;using the GLUT OpenGL extensions.\n\n&amp;quot; +&lt;br /&gt;
                         &amp;quot;When you 're ready to proceed, please click \&amp;quot;Next\&amp;quot;...&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    local glutpath_descr = _T(&amp;quot;Please select the location of GLUT on your computer.\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;This is the top-level folder where GLUT was installed (unpacked).\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;To help you, this folder must contain the subfolders\n&amp;quot; +&lt;br /&gt;
                              &amp;quot;\&amp;quot;include\&amp;quot; and \&amp;quot;lib\&amp;quot;.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    Wizard.AddInfoPage(_T(&amp;quot;GlutIntro&amp;quot;), intro_msg);&lt;br /&gt;
    Wizard.AddProjectPathPage();&lt;br /&gt;
    if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        GlutPathDefault=&amp;quot;/System/Library/Frameworks/GLUT.framework&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        Wizard.AddGenericSelectPathPage(_T(&amp;quot;GlutPath&amp;quot;), glutpath_descr, _T(&amp;quot;Please select GLUT's location:&amp;quot;), GlutPathDefault);&lt;br /&gt;
    Wizard.AddCompilerPage(_T(&amp;quot;&amp;quot;), _T(&amp;quot;*&amp;quot;), true, true);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// GLUT's path page&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
function OnLeave_GlutPath(fwd)&lt;br /&gt;
{&lt;br /&gt;
    if (fwd)&lt;br /&gt;
    {&lt;br /&gt;
        local dir         = Wizard.GetTextControlValue(_T(&amp;quot;txtFolder&amp;quot;)); // txtFolder is the text control in GenericSelectPathPage&lt;br /&gt;
        local dir_nomacro = VerifyDirectory(dir);&lt;br /&gt;
&lt;br /&gt;
        if (dir_nomacro.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        // verify include dependencies&lt;br /&gt;
        local dir_nomacro_inc = GetCompilerIncludeDir(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (dir_nomacro_inc.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
        if (!VerifyFile(dir_nomacro_inc + wxFILE_SEP_PATH + _T(&amp;quot;GL&amp;quot;), _T(&amp;quot;glut.h&amp;quot;), _T(&amp;quot;GLUT's include&amp;quot;))) return false;&lt;br /&gt;
&lt;br /&gt;
        // verify library dependencies&lt;br /&gt;
        local dir_nomacro_lib = GetCompilerLibDir(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (dir_nomacro_lib.IsEmpty())&lt;br /&gt;
            return false;&lt;br /&gt;
&lt;br /&gt;
        if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;freeglut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            if (!VerifyLibFile(dir_nomacro_lib, _T(&amp;quot;glut&amp;quot;), _T(&amp;quot;GLUT's&amp;quot;))) return false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        GlutPath = dir; // Remember the original selection.&lt;br /&gt;
&lt;br /&gt;
        local is_macro = _T(&amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the include directory as macro&lt;br /&gt;
        is_macro = GetCompilerIncludeMacro(dir, GlutPathDefault, GlutPathDefaultInc);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real inc path we had computed instead&lt;br /&gt;
            GlutPathDefaultInc = dir_nomacro_inc;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // try to resolve the library directory as macro&lt;br /&gt;
        is_macro = GetCompilerLibMacro(dir, GlutPathDefault, GlutPathDefaultLib);&lt;br /&gt;
        if (is_macro.IsEmpty())&lt;br /&gt;
        {&lt;br /&gt;
            // not possible -&amp;gt; use the real lib path we had computed instead&lt;br /&gt;
            GlutPathDefaultLib = dir_nomacro_lib;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// return the files this project contains&lt;br /&gt;
function GetFilesDir()&lt;br /&gt;
{&lt;br /&gt;
    return _T(&amp;quot;glut/files&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// setup the already created project&lt;br /&gt;
function SetupProject(project)&lt;br /&gt;
{&lt;br /&gt;
    // set project options&lt;br /&gt;
    if (PLATFORM != PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddIncludeDir(GlutPathDefaultInc);&lt;br /&gt;
        project.AddLibDir(GlutPathDefaultLib);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // add link libraries&lt;br /&gt;
    if (PLATFORM == PLATFORM_MSW)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;opengl32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glu32&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;winmm&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;gdi32&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
    else if (PLATFORM == PLATFORM_MAC)&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework GLUT&amp;quot;));&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework OpenGL&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
        project.AddLinkerOption(_T(&amp;quot;-framework Cocoa&amp;quot;)); // GLUT dependency&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;glut&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GL&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;GLU&amp;quot;));&lt;br /&gt;
        project.AddLinkLib(_T(&amp;quot;Xxf86vm&amp;quot;));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // enable compiler warnings (project-wide)&lt;br /&gt;
    WarningsOn(project, Wizard.GetCompilerID());&lt;br /&gt;
&lt;br /&gt;
    // Debug&lt;br /&gt;
    local target = project.GetBuildTarget(Wizard.GetDebugName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttConsoleOnly); // ttConsoleOnly: console for debugging&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetDebugOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable generation of debugging symbols for target&lt;br /&gt;
        DebugSymbolsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Release&lt;br /&gt;
    target = project.GetBuildTarget(Wizard.GetReleaseName());&lt;br /&gt;
    if (!IsNull(target))&lt;br /&gt;
    {&lt;br /&gt;
        target.SetTargetType(ttExecutable); // ttExecutable: no console&lt;br /&gt;
        target.SetOutputFilename(Wizard.GetReleaseOutputDir() + Wizard.GetProjectName() + DOT_EXT_EXECUTABLE);&lt;br /&gt;
        target.SetWorkingDir(GlutPath + _T(&amp;quot;/bin&amp;quot;));&lt;br /&gt;
        // enable optimizations for target&lt;br /&gt;
        OptimizationsOn(target, Wizard.GetCompilerID());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''This line &amp;quot;project.AddLinkLib(_T(&amp;quot;Glut32&amp;quot;));&amp;quot;    should now say      &amp;quot;project.AddLinkLib(_T(&amp;quot;freeglut&amp;quot;));&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
Now.. one more file to edit and your done..&lt;br /&gt;
&lt;br /&gt;
go to this folder by back tracking a little bit : C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\templates&lt;br /&gt;
&lt;br /&gt;
in there you will find glut.cbp&lt;br /&gt;
&lt;br /&gt;
This is the file that is for your project to work off of. You need to edit this too. Here is the code :&lt;br /&gt;
&lt;br /&gt;
== glut.cbp ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_project_file&amp;gt;&lt;br /&gt;
	&amp;lt;FileVersion major=&amp;quot;1&amp;quot; minor=&amp;quot;4&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;Project&amp;gt;&lt;br /&gt;
		&amp;lt;Option title=&amp;quot;glut&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option pch_mode=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;Build&amp;gt;&lt;br /&gt;
			&amp;lt;Target title=&amp;quot;default&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;Option output=&amp;quot;glut.exe&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option type=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option compiler=&amp;quot;gcc&amp;quot; /&amp;gt;&lt;br /&gt;
				&amp;lt;Option includeInTargetAll=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;/Target&amp;gt;&lt;br /&gt;
		&amp;lt;/Build&amp;gt;&lt;br /&gt;
		&amp;lt;Compiler&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.include)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Compiler&amp;gt;&lt;br /&gt;
		&amp;lt;Linker&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;glu32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;opengl32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;winmm&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;gdi32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;user32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add library=&amp;quot;kernel32&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Add directory=&amp;quot;$(#glut.lib)&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Linker&amp;gt;&lt;br /&gt;
		&amp;lt;Unit filename=&amp;quot;main.cpp&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;Option compilerVar=&amp;quot;CPP&amp;quot; /&amp;gt;&lt;br /&gt;
			&amp;lt;Option target=&amp;quot;default&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;/Unit&amp;gt;&lt;br /&gt;
	&amp;lt;/Project&amp;gt;&lt;br /&gt;
&amp;lt;/CodeBlocks_project_file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''See this line   &amp;quot;&amp;lt;Add library=&amp;quot;Glut32&amp;quot; /&amp;gt;&amp;quot;    should now say     &amp;quot;&amp;lt;Add library=&amp;quot;freeglut&amp;quot; /&amp;gt;&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
Because of windows Protections, it will force you to save it somewhere else. Just save it to your desktop and then MOVE the file into the same folder as the old one and overwrite. It will ask for permission, click continue. ( or yes on some machines ).&lt;br /&gt;
&lt;br /&gt;
So save those files and run codeblocks. Choose Glut. And where it asks where Glut is, point to : C:\Program Files (x86)\CodeBlocks\MinGW. It will find the glut.h file you need. It will ask you what compiler, I use GNU GCC Compiler. ( The name MinGW is not in the list for some reason. ) &lt;br /&gt;
So yea.. run the demo right out of the original CodeBlocks code and you will see some red spinning objects. :)&lt;br /&gt;
&lt;br /&gt;
[[File:Freeglut_2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[User:JackDawson|JackDawson]] 14:09, 8 July 2011 (CEST)&lt;/div&gt;</summary>
		<author><name>JackDawson</name></author>
	</entry>
</feed>