Scripts / How to build Lua extension module?

Author
Message
gaussmake1994
8
Years of Service
User Offline
Joined: 25th Jul 2015
Location:
Posted: 26th Jul 2015 15:57 Edited at: 26th Jul 2015 21:38
Now I need to add extension to Lua, so I trying to build it.
As I can see by worked OmegaCore - needed Lua library version is 5.2.3, right?
But when I trying to "require" library with next code :

with VC10 version of lua52 library (with statically linking, getted from http://sourceforge.net/projects/luabinaries/files/5.2.3/Windows%20Libraries/Static/) - I get "multiple lua vms detected" error.
What I'm doing wrong?
GameGuru version is 1.01.0033

Attachments

Login to view attachments
gaussmake1994
8
Years of Service
User Offline
Joined: 25th Jul 2015
Location:
Posted: 28th Jul 2015 12:35
Maybe I solved problem, but my code have some dirty hacks about VM version check (it's include full Lua code with one patch)
When I trying next :

I succesffully getted "1".

Attachments

Login to view attachments
tomjscott
User Banned
Posted: 28th Jul 2015 13:49 Edited at: 28th Jul 2015 13:52
I don't know if you solved your issues yet, but here is some sample code of how I did it.





I hope that helps. One thing I remember is that the method you are using to register functions never seemed to work for me so I used this alternate method.
System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640
gaussmake1994
8
Years of Service
User Offline
Joined: 25th Jul 2015
Location:
Posted: 28th Jul 2015 16:46
Oh, thanks.
It's works.

Login to post a reply

Server time is: 2024-05-09 00:49:14
Your offset time is: 2024-05-09 00:49:14