Install glut package to Dev-C++
Monday, June 04, 2007 by HongJunX
Okay,glut is not necessary in OpenGL programing,but it makes our job easier.I choose Deb-C++ as my development tool,so this post shows how to install glut package to Dev-C++ compiler.The core components of Dev-C++ are GNU-gcc and GNU-g++ complier,famous compilers and almost the only C/C++ compilers in *nix platform.I strongly recommend you try to use Dev-C++,it is good and easy to use as I think,and good support to C++ strandard.(I had encountered the getline function and local variabl scope problems in my VC++6.0,so I turn my head to Dev-c++)
If you do not have a Dev-C++ installed in your PC,as I said before,why not install it,it is free and really good.Are you ready?
Here are 3 things that you need to do:
i Download and install Dev C++
ii Download glut (OpenGL)
iii Create a project to run a your first OpenGl program in Dev-C++
Step i
Dev C++ can be downloaded from here.
Step ii
To use Open GL install the correct version of glut DevPack go to http://www.nigels.com/glt/devpak.
Download glut.3.7.6+.DevPak to a local folder
In Dev C++ open the package manager:
Tools->Package Manager
Install the glut package:
Package->Install Package
Browse to the local location where the package was downloaded to follow the installation wizard
The glut package should now appear in the main pane
Exit package manager
Step iii
To compile, build and run using Dev C++: make a new project:
File->New->Project...
Select Empty Project type from the Basic tab window
Make sure C++ project is selected
Create the new project in the folder with the source file
Add the .cpp file to the project:
Project->add to project
select the .cpp file
Define the linker options:
Project->Project options
In the Parameters tab window add the following line in the Linker pane:
-lglut32 -lglu32 -lopengl32 -lwinmm -lgdi32
click ok
Compile and run the project:
Execute->Compile & run
If you do not have a Dev-C++ installed in your PC,as I said before,why not install it,it is free and really good.Are you ready?
Here are 3 things that you need to do:
i Download and install Dev C++
ii Download glut (OpenGL)
iii Create a project to run a your first OpenGl program in Dev-C++
Step i
Dev C++ can be downloaded from here.
Step ii
To use Open GL install the correct version of glut DevPack go to http://www.nigels.com/glt/devpak.
Download glut.3.7.6+.DevPak to a local folder
In Dev C++ open the package manager:
Tools->Package Manager
Install the glut package:
Package->Install Package
Browse to the local location where the package was downloaded to follow the installation wizard
The glut package should now appear in the main pane
Exit package manager
Step iii
To compile, build and run using Dev C++: make a new project:
File->New->Project...
Select Empty Project type from the Basic tab window
Make sure C++ project is selected
Create the new project in the folder with the source file
Add the .cpp file to the project:
Project->add to project
select the .cpp file
Define the linker options:
Project->Project options
In the Parameters tab window add the following line in the Linker pane:
-lglut32 -lglu32 -lopengl32 -lwinmm -lgdi32
click ok
Compile and run the project:
Execute->Compile & run
0 Comments:
Post a Comment