0

I got a problem to compile (see 1) on a orangepi which is running a armbian (Jessie) desktop image (5.11).

I have set up a Makefile (see 2) which works quiet well, except of the link call.

My main.cpp file only includes the ogles_gpgpu primary header file at the moment.

The following error happen a lot of times during the link procedure.

g++ -o main main.cpp *.o -O0 -g -D__ORANGEPIPC__ -I./ogles_gpgpu -I./ogles_gpgpu/common/ -I./ogles_gpgpu/common/gl -L/usr/lib/mali -lGLESv2 -lEGL -lGL -lglut -lGLEW -lm
In file included from ogles_gpgpu/common/../platform/orangepipc/gl_includes.h:15:0,
             from ogles_gpgpu/common/common_includes.h:23,
             from ogles_gpgpu/ogles_gpgpu.h:20,
             from main.cpp:19:
/usr/include/GLES2/gl2ext.h:761:15: error: expected ‘)’ before ‘*’ token
typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
           ^
/usr/include/GLES2/gl2ext.h:762:15: error: expected ‘)’ before ‘*’ token
typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
           ^

This is a build logfile for further information at (see 2).

The gl2ext.h file is imported as a C header which is caused by the file itself.

Does anyone got any kind of hint?

4

1 回答 1

0

我认为您有重复的标题GL/glew.h和/或GL/glut.h.

使用您的以下标头main.cpp,它可以很好地编译:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include "ogles_gpgpu/ogles_gpgpu.h"

代替

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <GL/glew.h>
#include <GL/glut.h>
#include "ogles_gpgpu/ogles_gpgpu.h"
于 2016-07-18T02:08:59.760 回答