"I don't think you can use the dll with a project like wxLua that has
already linked with the exact same .lib, but I could be wrong. Perhaps
since the luasocket is trying to open the lua dll it will resolve the
names of the functions it needs soley from within the dll, if so it
should work?"

This most definately will not work.  Any static/global variables in one library will not resolve to the other.  You can successfully link and run together, but you will have problems such as random crashes if the lua libraries rely on static/global variables stored in the library. 

To link correctly you'll need to link luasocket.dll and wxLua.dll against the same lua50.dll.

I have the same problem with wxLua , but apparently the CVS version fixes that.  Hurray for lua 5.1 standardization of binary modules :) 


John Labenski <[EMAIL PROTECTED]> wrote:
On 6/21/06, Steve Kieu <[EMAIL PROTECTED]> wrote:
>
> I have several lua addon and want to use with wxLua. (luasocket for
> example). Compile in window with vc7, I have to supply the .lib lua (I use
> lua50.lib which is a pair with lua50.dll download from lua binaries). As far
> as I understand the compiler need the .lib to resolve symbols in the addon
> lib. When I call from wxLua script (running by one of wxLuaState) it would
> not depend on lua50.dll . But it is not right, it still requires lua50.dll
> which might be incompatible with wxLua. My question is why and is there any
> problem with it apart from I have to bring lua50.dll while I have already
> lua interpreter in my app.

I don't know? Does the linker tell you about unresolved symbols and
their names? Can you just link directly to luasocket if you compile it
as a lib as well?

> Adding the lua addon files to my project and directly link to my app is one
> solution but luasocket is rather complex pack.
>
> What I would like to do is to compile third party addon lib but not depend
> on lua50.dll when I have wxLua ; how can I do this?

I don't think you can use the dll with a project like wxLua that has
already linked with the exact same .lib, but I could be wrong. Perhaps
since the luasocket is trying to open the lua dll it will resolve the
names of the functions it needs soley from within the dll, if so it
should work? In any case trying to mix and match lua versions will
never work. The 2.6.2 wxLua uses a fairly vanilla 5.0.2, the changes
made for wxLua should not affect the normal operation of the
lua_State.

IIRC you wanted to stay with 5.0, but if you use wxLua from CVS or a
snapshot you can use wxLua as a dll as well, but it's lua 5.1.

Good luck,
John Labenski

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wxlua-users mailing list
Wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users


Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wxlua-users mailing list
Wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to