GLX and Xlib

Csaba Raduly rcsaba@gmail.com
Sun Jan 24 10:59:37 GMT 2021


Hi Rafal,

On Sun, 24 Jan 2021 at 11:48, Rafał Jopek via Cygwin  wrote:
>
> Hello,
>
> I have a compile error, can anyone help fix this?
>
> An example is here:
>
https://www.khronos.org/opengl/wiki/Programming_OpenGL_in_Linux:_GLX_and_Xlib
>
> Compile error:
>
> $ gcc quad.c -o quad -lX11 -lGL -lGLU
> In file included from quad.c:12:
> /usr/include/w32api/GL/glu.h:68:78: error: expected ‘)’ before ‘*’ token
>    68 | void APIENTRY gluQuadricCallback(GLUquadric *qobj,GLenum
which,void (CALLBACK *fn)());
>       |
           ^~
>       |
           )

If you want to program with OpenGL, you need to install the development
package (libGLU-devel-9.0.1-1
<https://cygwin.com/cgi-bin2/package-cat.cgi?file=x86_64%2FlibGLU-devel%2FlibGLU-devel-9.0.1-1&grep=glu.h>
) and runtime (libGLU-9.0.1-1) .

At the moment, the Cygwin compiler is finding the Win32 OpenGL headers.
Because Cygwin is not Windows, this is not going to work.


Csaba

-- 
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformant
way
to get the wrong information: this is what you want. - Scott Meyers
(C++TDaWYK)


More information about the Cygwin mailing list