[[email protected] esdl]# rebar compile
==> esdl (compile)
Compiling c_src/esdl_gl.c
In file included from c_src/esdl_gl.c:14:0:
void gl_dispatch(sdl_data *, int, ErlDrvSizeT, char *);
^
c_src/esdl_gl.c: 在函数‘es_init_opengl’中:
c_src/esdl_gl.c:106:2: 警告:隐式声明函数‘gl_dispatch’ [-Wimplicit-function-declaration]
gl_dispatch(sd, ESDL_OpenglInitFunc, len, bp);
^
c_src/esdl_gl.c: 在文件作用域:
c_src/esdl_gl.c:156:40: 错误:未知的类型名‘ErlDrvSizeT’
void gl_dispatch(sdl_data *sd, int op, ErlDrvSizeT len, char *bp)
^
ERROR: compile failed while processing /usr/local/ERL_LIBS_FILE/esdl: rebar_abort
解决办法:
[[email protected] esdl]#cd c_src
分别编辑esdl.h和esdl_gl.c,将ErlDrvSizeT替换成size_t
[[email protected] esdl]#
相关参考文档:http://www.erlang.org/doc/man/erl_driver.html#ErlDrvSizeT