Page 1 of 1

Compiling from source and Lua module

Posted: Mon Jul 09, 2007 17:19
by Thor22
Hi,
I tried to compile Cegui 5.0 form source package with this command :
./configure --disable-irrlicht-renderer --enable-toluacegui --enable-debug --with-default-xml-parser=XercesParser

so I get this summary:
********************************************************************************
* Crazy Eddie's GUI System - Configuration Results Summary
********************************************************************************
* Library Release Version: 0.5.0
*
* Code options:
* Building CEGUI in debug mode: yes
*
* Renderer Modules:
* Building OpenGL Renderer: yes
* Building Irrlicht Renderer: no
*
* Image Loading Codec Modules (currently for OpenGL Renderer only):
* Building Corona Image Codec: no
* Building DevIL Image Codec: yes
* Building FreeImage Image Codec: no
* Building SILLY Image Codec: no
* Building TGA Image Codec: yes
*
* Default Image Codec will be: DevILImageCodec
*
* XML Parser Modules:
* Building TinyXMLParser: yes
* Building ExpatParser: no
* Building LibXMLParser: no
* Building XercesParser: yes
*
* Default XML Parser is: XercesParser
*
* Scripting:
* Building Lua scripting module: no
* Building tolua++cegui generator: yes
*
* Samples Framework:
* Building Samples: no
* GTK2 based dialog for renderer selection: no
* OpenGL Renderer available in samples: no
* Irrlicht Renderer available in samples: no
* Ogre3D Renderer available in samples: no
********************************************************************************



but he doesn't want to compile the Lua's module. I checked my dependencies and I have these packages installed :
liblua40
liblua40-dev
liblua5.1-0
liblua5.1-0-dev
libua50
liblua50-dev
liblualib40
liblualib50
libtolua-dev
libtolua0
lua50


What is wrong ?

Re: Compiling from source and Lua module

Posted: Mon Jul 09, 2007 19:55
by Pompei2
Thor22 wrote:* Scripting:
* Building Lua scripting module: no

I personally have lua disabled, but I wonder if this is correct ??

Posted: Mon Jul 09, 2007 20:21
by Thor22
If he is disabled, Lua scripts won't be able to be loaded isn't it ?
But I have to load some Lua scripts in my project that is the problem :P

Posted: Tue Jul 10, 2007 22:05
by Pompei2
try to configure with

Code: Select all

--enable-lua-module

And if this does not work, take a look at what ./configure wrote in the console, there must be some reason he disabled lua. Maybe he can't find your lua headers or libs ? then you will need to specify the path to manually.

Posted: Wed Jul 11, 2007 10:30
by Thor22
Ok that is fix, just rename /usr/lib/pkgconfig/lua50.pc to lua.pc :wink:
But now I have some linking problems when I do "make":
/home/thor/Heroes/Cegui/ScriptingModules/CEGUILua/LuaScriptModule/src/.libs/libCEGUILuaScriptModule.so: undefined reference to `luaopen_table'
/home/thor/Heroes/Cegui/ScriptingModules/CEGUILua/tolua++/.libs/libCEGUItoluapp.so: undefined reference to `lua_dobuffer'
/home/thor/Heroes/Cegui/ScriptingModules/CEGUILua/LuaScriptModule/src/.libs/libCEGUILuaScriptModule.so: undefined reference to `luaopen_io'
/home/thor/Heroes/Cegui/ScriptingModules/CEGUILua/LuaScriptModule/src/.libs/libCEGUILuaScriptModule.so: undefined reference to `luaL_unref'
/home/thor/Heroes/Cegui/ScriptingModules/CEGUILua/LuaScriptModule/src/.libs/libCEGUILuaScriptModule.so: undefined reference to `luaL_error'
/home/thor/Heroes/Cegui/ScriptingModules/CEGUILua/LuaScriptModule/src/.libs/libCEGUILuaScriptModule.so: undefined reference to `luaopen_string'
/home/thor/Heroes/Cegui/ScriptingModules/CEGUILua/LuaScriptModule/src/.libs/libCEGUILuaScriptModule.so: undefined reference to `luaopen_base'
/home/thor/Heroes/Cegui/ScriptingModules/CEGUILua/tolua++/.libs/libCEGUItoluapp.so: undefined reference to `luaL_getmetatable'
/home/thor/Heroes/Cegui/ScriptingModules/CEGUILua/tolua++/.libs/libCEGUItoluapp.so: undefined reference to `luaL_newmetatable'
/home/thor/Heroes/Cegui/ScriptingModules/CEGUILua/LuaScriptModule/src/.libs/libCEGUILuaScriptModule.so: undefined reference to `luaopen_debug'
/home/thor/Heroes/Cegui/ScriptingModules/CEGUILua/LuaScriptModule/src/.libs/libCEGUILuaScriptModule.so: undefined reference to `luaL_loadbuffer'
/home/thor/Heroes/Cegui/ScriptingModules/CEGUILua/LuaScriptModule/src/.libs/libCEGUILuaScriptModule.so: undefined reference to `luaopen_math'
/home/thor/Heroes/Cegui/ScriptingModules/CEGUILua/LuaScriptModule/src/.libs/libCEGUILuaScriptModule.so: undefined reference to `luaL_ref'


I think it is because of a conflict between Cegui and Lua but I don't know what version of Lua I must use...

Posted: Wed Jul 11, 2007 16:58
by Pompei2
I think it is 5.1.x, but i'm not sure. search the forums I think there were similar problems in the past.

Posted: Wed Jul 11, 2007 20:10
by Thor22
I used 5.0 successfully and I just forget to link liblua.a ^^.
I am newbie on Linux I wonder what is the difference between static libraries ".a" and shared libraries ".so" ?

Posted: Thu Jul 12, 2007 09:47
by Pompei2
static libs .a are just archives that contain .o files (.o is compiled code that you can link, like .obj in visual studio), you can open .a libs with an archive tool (like ark). If you link with a .a lib, then all the library code is in your executable file.

shared libs .so are like windows .dll files, they are loaded dynamically and not linked into your executable. Like the dll's in windows, .so files cause a lot of trouble :D

Posted: Thu Aug 23, 2007 03:53
by arbuckle911
I just had this problem. I checked config.log and it turns out I had lua 5.1.1 and CEGUI wanted max 5.1. I went into the configure script and changed all the lua 5.1 strings to lua 5.1.2 and it compiled. I haven't tested it at all yet, but since CEGUI hasn't been updated (at least in a stable release) perhaps an official word should be put in from the developers that lua 5.1.1 is CEGUI safe or not.

Posted: Thu Aug 30, 2007 10:11
by daves
Hi,
I'm interested in hearing about your success in using lua+cegui. I'm a fan of lua, tho i have not used it yet. I also love the cegui architecture. I think the two components may be very powerful together.

Please let us know as you keep moving this along.

Thanks for the effort.