Warning 2: File not found opengl32.lib
Warning 2: File not found glu32.lib
Warning 2: File not found glut32.lib
.
.
.
*errors following from the first three messages*
.
.
.
This is the code:
#include <GL/glut.h> void myinit(); void display(); int main(int argc, char **argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB); glutInitWindowSize(500,500); glutInitWindowPosition(0,0); glutCreateWindow("Simple OpenGL Example"); glutDisplayFunc(display); myinit(); glutMainLoop(); return 0; } void myinit(void) { /* Attributes */ glClearColor(1.0, 1.0, 1.0, 1.0); // White glColor3f(1.0, 0.0, 0.0); // Red /* Set up viewing */ glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0.0, 500.0, 0.0, 500.0); glMatrixMode(GL_MODELVIEW); } void display(void) { typedef GLfloat point2[2]; // Define a point data type point2 vertices[3]={{0.0, 0.0}, {250.0, 500.0}, {500.0, 0.0}}; // Triangle int i, j , k; int rand(); point2 p={75.0,75.0}; // Arbitrary point inside the triangle glClear(GL_COLOR_BUFFER_BIT); // Clear the window /* Compute and output 5000 new points */ for (k=0;k<5000;k++) { j = rand()%3; // Pick a random vertex /* Compute halfway between vertex and old point */ p[0]=(p[0]+vertices[j][0])/2.0; p[1]=(p[1]+vertices[j][1])/2.0; /* Plot point */ glBegin(GL_POINTS); glVertex2fv(p); glEnd(); } }