Hey how's it goin' every body,
I am pretty new to opengl so please bear with me a little k. Here goes... I downloaded glut.dll,glut.lib and glut.h. Placed them in the following directories: glut32.dll to windows system32 directory, glut32.lib to dev-cpp lib directory, and glut.h to dev-cpp gl directory. Yet when I compile a simple opengl win32 "draw quad" program I get Link errors.
So I checked to see if I added the link to the project - project options/ parameter then added the line "-lglut32" but without the quotes. I even added the line #pragma comment(lib,"glut32.lib")
to be safe. I'm using Windows Vista with DEV-CPP.
These are the three errors that pops up after compiling:
[Linker error] undefined reference to '__glutInitWithExit@12'
[Linker error] undefined reference to '__glutCreateWindowWithExit@8'
[Linker error] undefined reference to '__glutCreateMenuWithExit@8'
The line of code that uses it is in my "InitGL" function.
#pragma comment(lib,"opengl32.lib")
#pragma comment(lib,"glut32.lib")
#include <windowsx.h>
#include <windows.h>
#include <gl/gl.h>
#include <gl/glu.h>
#include <gl/glut.h>
#include <ctype.h>
//globals goes here
int *g_pi;
char g_char;
bool InitGL()
{//all opengl inits goes here
glutInit(&g_pi,g_char);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glShadeModel(GL_SMOOTH);
return TRUE;
}
And the only place I use glut is in my rendering function "SceneRendering" namely "glSolidCube". I've looked every where for a solution and found a few installation manual but it didn't solve my linking situation. I was hoping that someone could confirm that I correctly installed glut and properly set it up into my project. Much oblique to you all for your help.