awood said:
As indicated above, you should be using opengl32, not opengl. I prefer to link in the static library opengl32.lib. I know in visual studio, you can go to your project settings, and add opengl32.lib to the "Additional Dependencies" field (under Linker depending on your version).

I'm sorry but I don't understand. I'm using lcc-win32 and in the list of additional libraries I show: opengl32.lib glu32.lib glut.lib
if I take out glut.lib it won't compile. Here is the code:
#include <GL/glut.h>
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_POLYGON);
glVertex2f(-0.5, -0.5);
glVertex2f(-0.5, 0.5);
glVertex2f(0.5, 0.5);
glVertex2f(0.5, -0.5);
glEnd();
glFlush();
}
void init(void)
{
glClearColor(0.0, 0.0, 0.0, 0.0);
glColor3f(1.0, 0.5, 0.5);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(-1.0, 1.0, -1.0, 1.0);
}
int main(int argc, char * argv[])
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB);
glutInitWindowSize(500, 500);
glutInitWindowPosition(0, 0);
glutCreateWindow("Sample");
glutDisplayFunc(display);
init();
glutMainLoop();
return 0;
}
It compiles successfully, but when I execute it I get this error:
"c:\lcc\projects\lcc\main.exe"
Return code -1073741515
Execution time 0.064 seconds
Press any key to continue...
when I as comiling it at school, I also got a messagebox saying it could not find opengl.dll. now at home I just get the message above.
Edit: I forgot to copy glut32.dll and glut.dll to the project dir. NOW I'm getting the missing opengl.dll message here at home too...
-SelArom