Unable to compile OpenGL sample code

flexion

Active member
Sep 23, 2020
139
93
28
Switzerland
I tried to compile an app which uses OpenGL but got errors while compiling.
So I tried to compile a small opengl demo like glxgears as well as a short piece of GL/GLX sample code from the SGI OpenGL guide PDF, but all throw the same error:

Code:
$ gcc -o test test.c 
In file included from test.c:4:
/usr/include/GL/glx.h:65:27: error: 'GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX' undeclared here (not in a function)
   65 |            char  pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
and my includes are:
Code:
#include <stdio.h>
#include <stdlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
I'm using SGUG-RSE gcc in sgugshell on IRIX 6.5.30.

what am I missing or what am I doing wrong?
I can also post the code, but I bet this is a total no brainer noob user error and easy to answer :)

thanks!
 

onre

SYS 64738
Feb 8, 2019
135
85
28
Toijala, Finland
You're probably doing nothing wrong. Figuring out what's going on here - the macro is defined in a header and this shouldn't happen.
 

About us

  • Silicon Graphics User Group (SGUG) is a community for users, developers, and admirers of Silicon Graphics (SGI) products. We aim to be a friendly hobbyist community for discussing all aspects of SGIs, including use, software development, the IRIX Operating System, and troubleshooting, as well as facilitating hardware exchange.

User Menu