Compiling from source and Lua module

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Thor22
Just popping in
Just popping in
Posts: 7
Joined: Wed Apr 11, 2007 07:54
Contact:

Compiling from source and Lua module

Postby Thor22 » Mon Jul 09, 2007 17:19

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 ?

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Re: Compiling from source and Lua module

Postby Pompei2 » Mon Jul 09, 2007 19:55

Thor22 wrote:* Scripting:
* Building Lua scripting module: no

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

Thor22
Just popping in
Just popping in
Posts: 7
Joined: Wed Apr 11, 2007 07:54
Contact:

Postby Thor22 » Mon Jul 09, 2007 20:21

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

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Tue Jul 10, 2007 22:05

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.

Thor22
Just popping in
Just popping in
Posts: 7
Joined: Wed Apr 11, 2007 07:54
Contact:

Postby Thor22 » Wed Jul 11, 2007 10:30

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...

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Wed Jul 11, 2007 16:58

I think it is 5.1.x, but i'm not sure. search the forums I think there were similar problems in the past.

Thor22
Just popping in
Just popping in
Posts: 7
Joined: Wed Apr 11, 2007 07:54
Contact:

Postby Thor22 » Wed Jul 11, 2007 20:10

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" ?

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Thu Jul 12, 2007 09:47

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

arbuckle911
Just popping in
Just popping in
Posts: 6
Joined: Sat Nov 25, 2006 01:50

Postby arbuckle911 » Thu Aug 23, 2007 03:53

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.

daves
Home away from home
Home away from home
Posts: 253
Joined: Thu Feb 02, 2006 20:12

Postby daves » Thu Aug 30, 2007 10:11

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.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 16 guests