我在Linux FC16中的OpenGL上的一个项目中。到目前为止,我们已经做过很多3D了。
该公司本月决定将整个系统移植到OpenGL-ES。
我像往常一样安装了OpenGL ES:
yum install make gcc mesa-libGLES-devel mesa-libEGL-devel
ref. http://code.google.com/p/opengles-book-samples/wiki/Instructions
在Eclipse IDE上还包括ES:
Project > Properties > C/C++ Build > Settings > GCC C Linker > Libraries > Libraries (-l)+:
EGL
GLES
尝试运行编译器时,出现错误:
../src/esUtil.h:84:21: error: expected ‘)’ before ‘*’ token
../src/esUtil.h:85:21: error: expected ‘)’ before ‘*’ token
../src/esUtil.h:86:21: error: expected ‘)’ before ‘*’ token
引导我到此:
/// Callbacks
void (ESCALLBACK *drawFunc) ( void* );
void (ESCALLBACK *keyFunc) ( void*, unsigned char, int, int );
void (ESCALLBACK *updateFunc) ( void*, float deltaTime );
ref. http://code.google.com/p/angleproject/source/browse/trunk/samples/gles2_book/Common/esUtil.h?r=486
我尝试添加其他括号,但是无论如何它还是没有解决。这只是让我发疯。
任何建议或评论都突出表示赞赏!
最佳答案
在esUtil.h的顶部尝试:
#define __cdecl
看看是否建立。如果是这样,则说明__cdecl是gcc不支持的Windows定义有问题。
我认为解决方法是:
#define __cdecl __attribute__((__cdecl__))
PS:Cdecl是gcc不支持的Visual C扩展(我认为)。
关于android - OpenGL-ES Android : function pointers esUtil.h,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/8490182/