lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Module initialization functions are prefixed with the TOLU_API macro, which is defined with -D on the compilation command line.

Just check the first env.append command int the "SCsub" file on the standard lua Qt distribution.

Carlos Augusto.

Obs: I share your feeling about SCons and Python...

> -----Original Message-----
> From: lua-bounces@bazar2.conectiva.com.br
> [mailto:lua-bounces@bazar2.conectiva.com.br]On Behalf Of Javier Guerra
> Sent: Sunday, August 20, 2006 10:44 PM
> To: Lua list
> Subject: modulos en C++ con tolua++
> 
> 
> 
> Hi
> 
> I'm trying to do my first non-trivial LuaQT application.  For this i just 
> started trying tolua++ (1.0.92). i want to write C++ classes and use them 
> from Lua as simple modules.
> 
> i already have everything compiled, installed and working.  i can 
> easily write 
> the skeleton app in Lua with Qt windows in Linux.
> 
> after a few experiments with makefile (zero experience with 
> SCons, and not 
> much sympathy for python), i can easily write test C++ classes, 
> apply tolua++ 
> and compile as a Lua module.  the only problem is the module 
> initialisation 
> function "luaopen_modname()", which isn't 'protected' by a 
> 'extern "C"', so 
> when using objdump to see the defined symbols in the loadable 
> library, the 
> name is mangled by the g++ compiler.
> 
> how's that problem avoided in LuaQt?  the generated C++ code is 
> similar to 
> what i get, but the symbol in the library isn't mangled!
> 
> -- 
> Javier
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.405 / Virus Database: 268.11.4/424 - Release Date: 8/21/2006
>  
>   
> 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.4/424 - Release Date: 8/21/2006