Find the answer to your Linux question:
Results 1 to 1 of 1
Hi, I'm quite new to linux and am facing a few problems while compiling a program in C which uses OpenGL. I have installed Red Hat Enterprise Linux 5 and ...
  1. #1
    Just Joined!
    Join Date
    Oct 2008
    Location
    Bloomington,Indiana
    Posts
    1

    Compilation error with freeglut

    Hi,

    I'm quite new to linux and am facing a few problems while compiling a program in C which uses OpenGL. I have installed Red Hat Enterprise Linux 5 and freeglut was installed as part of the linux installation.

    ps3.c: In function 'initGL':
    ps3.c:66: error: 'GL_COLOR_BUFFER_BIT' undeclared (first use in this function)
    ps3.c:66: error: (Each undeclared identifier is reported only once
    ps3.c:66: error: for each function it appears in.)
    ps3.c: In function 'mouse':
    ps3.c:262: error: 'GLUT_DOWN' undeclared (first use in this function)
    ps3.c:279: error: 'GLUT_UP' undeclared (first use in this function)
    ps3.c:297: error: 'GLdouble' undeclared (first use in this function)
    ps3.c:297: error: expected ')' before 'X'
    ps3.c:299: error: 'GL_SELECT' undeclared (first use in this function)
    ps3.c:301: error: 'GL_PROJECTION' undeclared (first use in this function)
    ps3.c: In function 'keyboard':
    ps3.c:396: error: 'GL_MODELVIEW' undeclared (first use in this function)
    ps3.c:397: error: 'GL_MODELVIEW_MATRIX' undeclared (first use in this function)
    ps3.c:405: error: 'GL_PROJECTION' undeclared (first use in this function)
    ps3.c: In function 'drawLine':
    ps3.c:440: error: 'GL_LINES' undeclared (first use in this function)
    ps3.c: In function 'glowVertex':
    ps3.c:492: error: 'GL_COLOR_LOGIC_OP' undeclared (first use in this function)
    ps3.c:493: error: 'GL_XOR' undeclared (first use in this function)
    ps3.c:496: error: 'GL_POINTS' undeclared (first use in this function)
    ps3.c: In function 'glowEdge':
    ps3.c:519: error: 'GL_COLOR_LOGIC_OP' undeclared (first use in this function)
    ps3.c:520: error: 'GL_XOR' undeclared (first use in this function)
    ps3.c:524: error: 'GL_LINES' undeclared (first use in this function)
    ps3.c:531: error: 'GL_POINTS' undeclared (first use in this function)
    ps3.c: In function 'drawRect':
    ps3.c:596: error: 'GLUT_DOWN' undeclared (first use in this function)
    ps3.c:597: error: 'GL_COLOR_BUFFER_BIT' undeclared (first use in this function)
    ps3.c: In function 'reshape':
    ps3.c:647: error: 'GL_PROJECTION' undeclared (first use in this function)
    ps3.c:652: error: 'GL_MODELVIEW' undeclared (first use in this function)
    ps3.c: In function 'visibility':
    ps3.c:664: error: 'GLUT_VISIBLE' undeclared (first use in this function)
    ps3.c: In function 'display':
    ps3.c:679: error: 'GL_COLOR_BUFFER_BIT' undeclared (first use in this function)
    ps3.c:687: error: expected ';' before 'drawRect'
    ps3.c:691: error: expected ';' before 'break'
    ps3.c: In function 'main':
    ps3.c:712: error: 'GLUT_DOUBLE' undeclared (first use in this function)
    ps3.c:712: error: 'GLUT_RGB' undeclared (first use in this function)
    make: *** [ps3.o] Error 1


    Please find attached 'sample.zip'. It contains the following-
    - C program which I'm trying to compile
    - Makefile
    - header file

    Have I missed a step or two after the installation ? Something like configuring the path etc. If so then please let me know of the same.
    Any idea on which header file to use in case of freeglut ? Is it freeglut.h ? Though I couldn't find it on my linux box


    cheers,
    Andriyev
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...