Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

centos make不成功 #27

Open
fenghui2013 opened this issue Jan 17, 2014 · 2 comments
Open

centos make不成功 #27

fenghui2013 opened this issue Jan 17, 2014 · 2 comments

Comments

@fenghui2013
Copy link

gcc -g -Wall -Ilib -D EJOY2D_OS=LINUX -I/usr/include -I/usr/local/include -I/usr/include/freetype2 -o ej2d lib/shader.c lib/lshader.c lib/ejoy2dgame.c lib/fault.c lib/screen.c lib/texture.c lib/ppm.c lib/spritepack.c lib/sprite.c lib/lsprite.c lib/matrix.c lib/lmatrix.c lib/dfont.c lib/label.c lib/particle.c lib/lparticle.c lib/scissor.c posix/window.c posix/winfw.c posix/winfont.c -lGLEW -lGL -lX11 -lfreetype -llua -lm -Wl,-E
/tmp/ccTymNxz.o: In function ldraw': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lshader.c:41: undefined reference tolua_tounsignedx'
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lshader.c:43: undefined reference to luaL_optunsigned' /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lshader.c:46: undefined reference tolua_rawlen'
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lshader.c:58: undefined reference to lua_tonumberx' /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lshader.c:59: undefined reference tolua_tonumberx'
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lshader.c:60: undefined reference to lua_tonumberx' /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lshader.c:61: undefined reference tolua_tonumberx'
/tmp/ccTymNxz.o: In function ejoy2d_shader': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lshader.c:106: undefined reference toluaL_setfuncs'
/tmp/cc7FJCRH.o: In function ejoy2d_framework': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:72: undefined reference toluaL_setfuncs'
/tmp/cc7FJCRH.o: In function checkluaversion': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:78: undefined reference tolua_version'
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:79: undefined reference to lua_version' /tmp/cc7FJCRH.o: In functionejoy2d_game':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:97: undefined reference to lua_setglobal' /home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:104: undefined reference toluaL_requiref'
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:105: undefined reference to luaL_requiref' /home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:106: undefined reference toluaL_requiref'
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:107: undefined reference to luaL_requiref' /home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:108: undefined reference toluaL_requiref'
/tmp/cc7FJCRH.o:/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:109: more undefined references to luaL_requiref' follow /tmp/cc7FJCRH.o: In functiontraceback':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:138: undefined reference to luaL_traceback' /tmp/cc7FJCRH.o: In functionejoy2d_game_start':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:150: undefined reference to lua_callk' /tmp/cc7FJCRH.o: In functioncall':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ejoy2dgame.c:159: undefined reference to lua_pcallk' /tmp/ccgVdHtg.o: In functionsave_rgb':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ppm.c:372: undefined reference to lua_tointegerx' /home/aispeech/test/c_lua/ejoy2d/trunk/lib/ppm.c:373: undefined reference tolua_tointegerx'
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ppm.c:390: undefined reference to lua_tointegerx' /home/aispeech/test/c_lua/ejoy2d/trunk/lib/ppm.c:391: undefined reference tolua_tointegerx'
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ppm.c:392: undefined reference to lua_tointegerx' /tmp/ccgVdHtg.o:/home/aispeech/test/c_lua/ejoy2d/trunk/lib/ppm.c:408: more undefined references tolua_tointegerx' follow
/tmp/ccgVdHtg.o: In function saveppm': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/ppm.c:443: undefined reference tolua_rawlen'
/tmp/ccgVdHtg.o: In function ejoy2d_ppm': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/ppm.c:470: undefined reference toluaL_setfuncs'
/tmp/cczIpTHp.o: In function limport': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/spritepack.c:311: undefined reference tolua_rawlen'
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/spritepack.c:335: undefined reference to lua_tointegerx' /tmp/cczIpTHp.o: In functionlpackcolor':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/spritepack.c:392: undefined reference to luaL_checkunsigned' /tmp/cczIpTHp.o: In functionejoy2d_spritepack':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/spritepack.c:598: undefined reference to luaL_setfuncs' /tmp/cczxPY6I.o: In functionlnewlabel':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:56: undefined reference to luaL_optunsigned' /tmp/cczxPY6I.o: In functionnewsprite':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:125: undefined reference to lua_setuservalue' /tmp/cczxPY6I.o: In functionlsettext':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:304: undefined reference to lua_setuservalue' /tmp/cczxPY6I.o: In functionlgettext':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:315: undefined reference to lua_getuservalue' /tmp/cczxPY6I.o: In functionlgetcolor':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:322: undefined reference to lua_pushunsigned' /tmp/cczxPY6I.o: In functionlsetcolor':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:329: undefined reference to luaL_checkunsigned' /tmp/cczxPY6I.o: In functionlgetadditive':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:337: undefined reference to lua_pushunsigned' /tmp/cczxPY6I.o: In functionlsetadditive':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:344: undefined reference to luaL_checkunsigned' /tmp/cczxPY6I.o: In functionlgetter':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:363: undefined reference to luaL_setfuncs' /tmp/cczxPY6I.o: In functionlsetter':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:381: undefined reference to luaL_setfuncs' /tmp/cczxPY6I.o: In functionlfetch':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:391: undefined reference to lua_getuservalue' /tmp/cczxPY6I.o: In functionlmount':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:405: undefined reference to lua_getuservalue' /tmp/cczxPY6I.o: In functionlmulti_draw':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:474: undefined reference to lua_rawlen' /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:487: undefined reference tolua_tounsignedx'
/tmp/cczxPY6I.o: In function lookup': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:502: undefined reference tolua_getuservalue'
/tmp/cczxPY6I.o: In function lmethod': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:649: undefined reference toluaL_setfuncs'
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:664: undefined reference to luaL_setfuncs' /tmp/cczxPY6I.o: In functionejoy2d_sprite':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lsprite.c:674: undefined reference to luaL_setfuncs' /tmp/cc7Bib02.o: In functionlnew':
/home/aispeech/test/c_lua/ejoy2d/trunk/lib/lmatrix.c:12: undefined reference to lua_rawlen' /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lmatrix.c:16: undefined reference tolua_tointegerx'
/tmp/cc7Bib02.o: In function ejoy2d_matrix': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lmatrix.c:145: undefined reference toluaL_setfuncs'
/tmp/ccZgeI3I.o: In function dict_float': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lparticle.c:12: undefined reference tolua_tonumberx'
/tmp/ccZgeI3I.o: In function dict_int': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lparticle.c:20: undefined reference tolua_tointegerx'
/tmp/ccZgeI3I.o: In function ldata': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lparticle.c:179: undefined reference tolua_pushunsigned'
/tmp/ccZgeI3I.o: In function ejoy2d_particle': /home/aispeech/test/c_lua/ejoy2d/trunk/lib/lparticle.c:197: undefined reference toluaL_setfuncs'
/tmp/cc8IUseh.o: In function traceback': /home/aispeech/test/c_lua/ejoy2d/trunk/posix/winfw.c:43: undefined reference toluaL_traceback'
/tmp/cc8IUseh.o: In function ejoy2d_win_init': /home/aispeech/test/c_lua/ejoy2d/trunk/posix/winfw.c:95: undefined reference tolua_pcallk'
collect2: ld returned 1 exit status
make: *** [ej2d] Error 1

lua安装的是5.2.3版本,其他依赖组建也已安装。

@cloudwu
Copy link
Contributor

cloudwu commented Jan 17, 2014

非常明显是 lua 库的符号没有找到. 所以请确认有无正确 link liblua.a

@fenghui2013
Copy link
Author

多谢,问题已解决。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants