fork download
  1. gray@elemental:~$ aptitude search opengl p libghc6-opengl-dev
  2. #include <GL/glut.h>
  3. #include <stdlib.h>
  4.  
  5. void display(void)
  6. {
  7. glClearColor(0,0,0,0);
  8.  
  9. glClear(GL_COLOR_BUFFER_BIT);
  10.  
  11. glBegin(GL_LINES);
  12.  
  13. glColor3f(1,1,1);
  14.  
  15. glVertex2f(0,0);
  16. glVertex2f(0.5,0.1);
  17. glVertex2f(0.5,0.1);
  18. glVertex2f(0.4,0.4);
  19.  
  20. glVertex2f(0.4,0.4);
  21. glVertex2f(-0.1,0.3);
  22.  
  23. glVertex2f(0,0);
  24. glVertex2f(-0.1,0.3);
  25. glVertex2f(-0.1,0.3);
  26. glVertex2f(-0.2,0);
  27. glVertex2f(-0.2,0);
  28. glVertex2f(0,0);
  29.  
  30. glVertex2f(0,0);
  31. glVertex2f(0,-0.5);
  32. glVertex2f(0,-0.5);
  33. glVertex2f(0.5,-0.4);
  34. glVertex2f(0.5,-0.4);
  35. glVertex2f(0.5,0.1);
  36. glVertex2f(0,-0.5);
  37.  
  38. glVertex2f(-0.2,-0.4);
  39. glVertex2f(-0.2,0);
  40.  
  41. glVertex2f(-0.2,-0.4);
  42. glVertex2f(-0.2,0);
  43.  
  44.  
  45.  
  46.  
  47. glEnd();
  48.  
  49. glFlush();
  50. }
  51.  
  52. int main(int argc, char *argv[])
  53. {
  54. glutInit(&argc, argv);
  55. glutInitWindowSize(640,500);
  56. glutInitWindowPosition(1,1);
  57.  
  58. glutCreateWindow("hut");
  59.  
  60. glutDisplayFunc(display);
  61.  
  62.  
  63. glutMainLoop();
  64.  
  65. return EXIT_SUCCESS;
  66. }
  67.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:5: error: stray ‘@’ in program
 gray@elemental:~$ aptitude search opengl p   libghc6-opengl-dev
     ^
prog.cpp:2:21: fatal error: GL/glut.h: No such file or directory
 #include <GL/glut.h>
                     ^
compilation terminated.
stdout
Standard output is empty