Binding splitted between libraries (DLLs)

spam7000 <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
Hi,

I have a fairly complex app, that uses plugins and each plugin can export
(bind) its classes to Lua via luabind. The problem is that classes
registered within plugin1 doesn't work inside code registered by plugin2.
Here's an example:

Plugin1:
---------
module(L, "plugin1")
[ class_<Date>("date").def(constructor<int,int,int>()) ]

Plugin2:
---------
module(L, "plugin2")
[ class_<DateTime>("datetime").def(constructor<Date>()) ]

Lua:
---------
d = plugin1.date(2007, 7, 17)
dt = plugin2.datetime(d)

No matching overload found, candidates:
void __init(luabind::argument const&,custom [5Date])
stack traceback:
	[C]: ?
	[C]: in function 'datetime'
	stdin:1: in main chunk
	[C]: ?

Both C++ libraries (Plugin1 and Plugin2) use shared implementation of Date
and DateTime classes, so I can use Date class inside C++ Plugin2's code. I
just cannot use it inside Lua. I guess the problem involves type identity
(RTTI, typeid) but I don't know how to fix it. I could merge Plugin1 and
Plugin2 in one big plugin (then it works) but I'd like to have my app more
modular.

-- 
View this message in context: http://www.nabble.com/Binding-splitted-between-libraries-%28DLLs%29-tp24534417p24534417.html
Sent from the Lua C++ Bind mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.