数组元素类型不完整

时间:2012-02-26 22:51:33

标签: c lua

我正在试图找出为什么我无法在Mac OSX上编译enlightenment e17窗口管理器包ejde。 Make为我提供了以下输出(长线分为易读性):

libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I. \
-I../.. -I../../src/bin -I../../src/lib \
-DPACKAGE_BIN_DIR=\"/usr/local/bin\" \
-DPACKAGE_LIB_DIR=\"/usr/local/lib\" \
-DPACKAGE_DATA_DIR=\"/usr/local/share/edje\" \
-I/usr/local/include/eina-1 -I/usr/local/include/eina-1/eina \
-I/usr/local/include/eet-1 -I/usr/local/include/evas-1 \
-I/usr/local/include/freetype2 -I/usr/local/include \
-I/usr/local/include/ecore-1 -I/usr/local/include/embryo-1 \
-I/usr/local/include/ecore-1 -I/usr/local/include/eina-1 \
-I/usr/local/include/eina-1/eina -I/usr/local/include/evas-1 \
-I/usr/local/include/eet-1 -I/usr/local/include/freetype2 \
-I/usr/local/include \
-g -O2 -MT edje_lua2.lo -MD -MP -MF .deps/edje_lua2.Tpo \
-c edje_lua2.c  -fno-common -DPIC -o

.libs/edje_lua2.o edje_lua2.c:183: error: array type has incomplete element type

edje_lua2.c:638: error: array type has incomplete element
type edje_lua2.c: In function '_elua_messagesend':

第183行:

static const struct luaL_reg _elua_edje_gc_funcs [] =
{
     {"__gc", _elua_obj_gc}, // garbage collector func for edje objects

     {NULL, NULL} // end
};

2 个答案:

答案 0 :(得分:10)

我想这不是编译,因为lua-5.2没有这个:

#define luaL_reg      luaL_Reg

http://lua-users.org/lists/lua-l/2011-07/msg00708.html

9赞成,令人印象深刻。因为它在Mac上使用E17的价值是愚蠢的差事

答案 1 :(得分:1)

检查在声明struct luaL_reg对象之前声明的结构类型_elua_edje_gc_funcs

您可能会错过相关的标头文件:要么因为它未包含在内,系统中没有,要么缺少正确的-I路径。

相关问题