ejoy / ejoy2d

A 2D Graphics Engine for Mobile Game
MIT License
1.98k stars 641 forks source link

Compile error in my ubuntu 14 enviroment. #69

Open xiaoguizi87 opened 9 years ago

xiaoguizi87 commented 9 years ago

lib/shader.c: In function ‘shader_init’: lib/shader.c:23:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

define BUFFER_OFFSET(f) ((int)&(((struct vertex *)NULL)->f))

^ lib/shader.c:102:38: note: in expansion of macro ‘BUFFER_OFFSET’ { "position", 0, 2, sizeof(float), BUFFER_OFFSET(vp.vx) },

My gcc verion is gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)