This is the program:
#include <iostream>
#include <GL/freeglut.h>
int main(int argc, char **argv) {
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DEPTH|GLUT_DOUBLE|GLUT_RGBA);
glutInitWindowPosition(100,100);
glutInitWindowSize(320,320);
glutCreateWindow("3D Tech - GLUT Tutorial");
glEnable(GL_DEPTH_TEST);
glutMainLoop();
return 0;
}
This is the out put.
/tmp/ccNpt8Ux.o: In function main': main.cc: ( .text+0x6a): undefined reference to
glutInit’
main.cc: ( .text+0x74): undefined reference to glutInitDisplayMode' main.cc: ( .text+0x83): undefined reference to
glutInitWindowPosition’
main.cc: ( .text+0x92): undefined reference to glutInitWindowSize' main.cc: ( .text+0x9c): undefined reference to
glutCreateWindow’
main.cc: ( .text+0xa6): undefined reference to glEnable' main.cc: ( .text+0xab): undefined reference to
glutMainLoop’
collect2: ld returned 1 exit status
I think this just means glut is not installed correctly. I have also try xgl. Though i found not example programs. I really did not want to go looking for an api. I am new to this system in visual c++ you just went to system something 32 and through in the .dll. I used yast to install. but i could just as easily try “config; make” if there is a 64 bit glut source.
Graph