下記のコードですが下部のg++コンパイラによるエラーコードですがどうやって修正すればいいのでしょうか?色々触ってみましたが解決方法がわかりません。文字数の関係でだいぶ省略しています。
OS ubuntu
原文「 /usr/include/GL/glu.h:68:78: error: expected ‘)’ before ‘*’ token
68 | void APIENTRY gluQuadricCallback(GLUquadric *qobj,GLenum which,void (CALLBACK *fn)()); 」
日本語翻訳「 /usr/include/GL/glu.h:68:78:エラー:「*」トークンの前に「)」が必要です
68 | void APIENTRY gluQuadricCallback(GLUquadric * qobj、GLenum which、void(CALLBACK * fn)()); 」
cpp
1void APIENTRY gluEndSurface(GLUnurbs *nobj); 2void APIENTRY gluBeginTrim(GLUnurbs *nobj); 3void APIENTRY gluEndTrim(GLUnurbs *nobj); 4void APIENTRY gluPwlCurve(GLUnurbs *nobj,GLint count,GLfloat *array,GLint stride,GLenum type); 5void APIENTRY gluNurbsCurve(GLUnurbs *nobj,GLint nknots,GLfloat *knot,GLint stride,GLfloat *ctlarray,GLint order,GLenum type); 6void APIENTRY gluNurbsSurface(GLUnurbs *nobj,GLint sknot_count,float *sknot,GLint tknot_count,GLfloat *tknot,GLint s_stride,GLint t_stride,GLfloat *ctlarray,GLint sorder,GLint torder,GLenum type); 7void APIENTRY gluLoadSamplingMatrices(GLUnurbs *nobj,const GLfloat modelMatrix[16],const GLfloat projMatrix[16],const GLint viewport[4]); 8void APIENTRY gluNurbsProperty(GLUnurbs *nobj,GLenum property,GLfloat value); 9void APIENTRY gluGetNurbsProperty(GLUnurbs *nobj,GLenum property,GLfloat *value); 10void APIENTRY gluNurbsCallback(GLUnurbs *nobj,GLenum which,void (CALLBACK *fn)()); 11 12typedef void (CALLBACK *GLUquadricErrorProc)(GLenum); 13typedef void (CALLBACK *GLUtessBeginProc)(GLenum); 14typedef void (CALLBACK *GLUtessEdgeFlagProc) (GLboolean); 15typedef void (CALLBACK *GLUtessVertexProc)(void *); 16typedef void (CALLBACK *GLUtessEndProc)(void); 17 18//typedef void (CALLBACK *GLUtessErrorProc)(GLenum); 19typedef void (CALLBACK*) (GLUtessErrorProc)(GLenum); 20 21 22typedef void (CALLBACK *GLUtessCombineProc)(GLdouble[3],void*[4],GLfloat[4],void**); 23typedef void (CALLBACK *GLUtessBeginDataProc)(GLenum,void *); 24typedef void (CALLBACK *GLUtessEdgeFlagDataProc) (GLboolean,void *); 25typedef void (CALLBACK *GLUtessVertexDataProc)(void *,void *); 26typedef void (CALLBACK *GLUtessEndDataProc)(void *); 27typedef void (CALLBACK *GLUtessErrorDataProc)(GLenum,void *); 28typedef void (CALLBACK *GLUtessCombineDataProc)(GLdouble[3],void*[4],GLfloat[4],void**,void*); 29typedef void (CALLBACK *GLUnurbsErrorProc)(GLenum); 30
/usr/include/GL/glu.h:68:78: error: expected ‘)’ before ‘*’ token 68 | void APIENTRY gluQuadricCallback(GLUquadric *qobj,GLenum which,void (CALLBACK *fn)()); | ~ ^~ | ) /usr/include/GL/glu.h:68:79: error: expected initializer before ‘*’ token 68 | void APIENTRY gluQuadricCallback(GLUquadric *qobj,GLenum which,void (CALLBACK *fn)()); | ^ /usr/include/GL/glu.h:78:78: error: expected ‘)’ before ‘*’ token 78 | void APIENTRY gluTessCallback(GLUtesselator *tess,GLenum which,void (CALLBACK *fn)()); | ~ ^~ | ) /usr/include/GL/glu.h:78:78: error: expected ‘)’ before ‘*’ token 78 | void APIENTRY gluTessCallback(GLUtesselator *tess,GLenum which,void (CALLBACK *fn)()); | ~ ^~ | ) /usr/include/GL/glu.h:78:79: error: expected initializer before ‘*’ token 78 | void APIENTRY gluTessCallback(GLUtesselator *tess,GLenum which,void (CALLBACK *fn)()); | ^ /usr/include/GL/glu.h:94:74: error: expected ‘)’ before ‘*’ token 94 | void APIENTRY gluNurbsCallback(GLUnurbs *nobj,GLenum which,void (CALLBACK *fn)()); | ~ ^~ | ) /usr/include/GL/glu.h:94:74: error: expected ‘)’ before ‘*’ token 94 | void APIENTRY gluNurbsCallback(GLUnurbs *nobj,GLenum which,void (CALLBACK *fn)()); | ~ ^~ | ) /usr/include/GL/glu.h:94:75: error: expected initializer before ‘*’ token 94 | void APIENTRY gluNurbsCallback(GLUnurbs *nobj,GLenum which,void (CALLBACK *fn)());
この後も他のOpenGLの質問をされているようですが、本件は解決したのでしょうか。
回答1件
あなたの回答
tips
プレビュー