public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* GLX and Xlib
@ 2021-01-24 10:42 Rafał Jopek
  2021-01-24 10:59 ` Csaba Raduly
  0 siblings, 1 reply; 2+ messages in thread
From: Rafał Jopek @ 2021-01-24 10:42 UTC (permalink / raw)
  To: cygwin

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)());
      |                                                                              ^~
      |                                                                              )
/usr/include/w32api/GL/glu.h:78:78: error: expected ‘)’ before ‘*’ token
   78 | void APIENTRY gluTessCallback(GLUtesselator *tess,GLenum which,void (CALLBACK *fn)());
      |                                                                              ^~
      |                                                                              )
/usr/include/w32api/GL/glu.h:94:74: error: expected ‘)’ before ‘*’ token
   94 | void APIENTRY gluNurbsCallback(GLUnurbs *nobj,GLenum which,void (CALLBACK *fn)());
      |                                                                          ^~
      |                                                                          )
/usr/include/w32api/GL/glu.h:96:23: error: expected ‘)’ before ‘*’ token
   96 | typedef void (CALLBACK *GLUquadricErrorProc)(GLenum);
      |                       ^~
      |                       )
/usr/include/w32api/GL/glu.h:97:23: error: expected ‘)’ before ‘*’ token
   97 | typedef void (CALLBACK *GLUtessBeginProc)(GLenum);
      |                       ^~
      |                       )
/usr/include/w32api/GL/glu.h:98:23: error: expected ‘)’ before ‘*’ token
   98 | typedef void (CALLBACK *GLUtessEdgeFlagProc) (GLboolean);
      |                       ^~
      |                       )
/usr/include/w32api/GL/glu.h:99:23: error: expected ‘)’ before ‘*’ token
   99 | typedef void (CALLBACK *GLUtessVertexProc)(void *);
      |                       ^~
      |                       )
/usr/include/w32api/GL/glu.h:100:23: error: expected ‘)’ before ‘*’ token
  100 | typedef void (CALLBACK *GLUtessEndProc)(void);
      |                       ^~
      |                       )
/usr/include/w32api/GL/glu.h:101:23: error: expected ‘)’ before ‘*’ token
  101 | typedef void (CALLBACK *GLUtessErrorProc)(GLenum);
      |                       ^~
      |                       )
/usr/include/w32api/GL/glu.h:102:23: error: expected ‘)’ before ‘*’ token
  102 | typedef void (CALLBACK *GLUtessCombineProc)(GLdouble[3],void*[4],GLfloat[4],void**);
      |                       ^~
      |                       )
/usr/include/w32api/GL/glu.h:103:23: error: expected ‘)’ before ‘*’ token
  103 | typedef void (CALLBACK *GLUtessBeginDataProc)(GLenum,void *);
      |                       ^~
      |                       )
/usr/include/w32api/GL/glu.h:104:23: error: expected ‘)’ before ‘*’ token
  104 | typedef void (CALLBACK *GLUtessEdgeFlagDataProc) (GLboolean,void *);
      |                       ^~
      |                       )
/usr/include/w32api/GL/glu.h:105:23: error: expected ‘)’ before ‘*’ token
  105 | typedef void (CALLBACK *GLUtessVertexDataProc)(void *,void *);
      |                       ^~
      |                       )
/usr/include/w32api/GL/glu.h:106:23: error: expected ‘)’ before ‘*’ token
  106 | typedef void (CALLBACK *GLUtessEndDataProc)(void *);
      |                       ^~
      |                       )
/usr/include/w32api/GL/glu.h:107:23: error: expected ‘)’ before ‘*’ token
  107 | typedef void (CALLBACK *GLUtessErrorDataProc)(GLenum,void *);
      |                       ^~
      |                       )
/usr/include/w32api/GL/glu.h:108:23: error: expected ‘)’ before ‘*’ token
  108 | typedef void (CALLBACK *GLUtessCombineDataProc)(GLdouble[3],void*[4],GLfloat[4],void**,void*);
      |                       ^~
      |                       )
/usr/include/w32api/GL/glu.h:109:23: error: expected ‘)’ before ‘*’ token
  109 | typedef void (CALLBACK *GLUnurbsErrorProc)(GLenum);
      |                       ^~
      |                       )


Thank you in advance for your help.

Best regards
- Rafał




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: GLX and Xlib
  2021-01-24 10:42 GLX and Xlib Rafał Jopek
@ 2021-01-24 10:59 ` Csaba Raduly
  0 siblings, 0 replies; 2+ messages in thread
From: Csaba Raduly @ 2021-01-24 10:59 UTC (permalink / raw)
  To: Rafał Jopek; +Cc: cygwin

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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-24 10:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-24 10:42 GLX and Xlib Rafał Jopek
2021-01-24 10:59 ` Csaba Raduly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).