Embedding LUA in PureBasic!?
-
- Enthusiast
- Posts: 229
- Joined: Wed May 14, 2003 3:38 pm
- Location: Lüneburg - Germany
-
- Enthusiast
- Posts: 142
- Joined: Mon Sep 17, 2007 10:28 am
- Location: P.O.P
- Contact:
have a look on my websiteSofT MANiAC wrote:damnnnn.. 5.1 wrapper doesn't work and 5.0 confilcts with Irrlicht wrapper..
I love this world

http://www.realsource.de/downloads/doc_ ... pb-include
greetings
Thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

The LUA-Include was updated to work with PB 4.20 Beta 5 and 6
If you use this version, please download again.
greetings
Thomas
If you use this version, please download again.
greetings
Thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

-
- Enthusiast
- Posts: 142
- Joined: Mon Sep 17, 2007 10:28 am
- Location: P.O.P
- Contact:
@ts-soft
thanks! all works (maybe)
thanks! all works (maybe)
Last edited by SofT MANiAC on Thu May 15, 2008 9:04 am, edited 1 time in total.
POiNT.OF.PRESENCE group
-
- Enthusiast
- Posts: 142
- Joined: Mon Sep 17, 2007 10:28 am
- Location: P.O.P
- Contact:
nevermind, in anyway it also conflicts with Irrlicht wrapper:
Code: Select all
IncludeFile ("lua.pbi")
XIncludeFile "IrrlichtWrapper_Include.pbi"
ProcedureC CheckFail(L)
PrintN("Fehler")
ProcedureReturn 0 ; Funktion gibt 0 argumente zurueck
EndProcedure
ProcedureC CheckTest(L)
lua_pushnumber(L, 1 )
ProcedureReturn 1 ; <==== Invalid memory access. Read error...
EndProcedure
Procedure load()
script.s = "if CheckTest() == 0 then"
script.s + " CheckFail()"
script.s + "else"
script.s + " print('OK')"
script.s + "end"
If OpenConsole()
L = lua_open()
luaopen_base(L)
lua_register(L,"CheckTest", @CheckTest())
lua_register(L,"CheckFail", @CheckFail())
luaL_dostring(L, script)
Input()
CloseConsole()
EndIf
EndProcedure
load()
POiNT.OF.PRESENCE group
-
- Enthusiast
- Posts: 142
- Joined: Mon Sep 17, 2007 10:28 am
- Location: P.O.P
- Contact:
Re: Embedding LUA in PureBasic!?
Hi, sorry for bringing up such an old post ... but i have a request for ts-soft
I have been working with PB and lua for some time making internal tools for the company I work for, my boss has asked me to update the lua engine in our main database engine (custom engine written in PB and lua) from 5.1.2 to 5.1.4
I have added the 5.1.4 lib and dll to the engine and it works very well but I would like a static lib for the sake of portability, like the 5.1.2 lib at the RealSource website
is there any chance of getting the lib recompiled with the current stable version of lua (5.1.4), this would save me a huge headache as the task has fallen on my shoulders and I am no C++ dev, im strictly PB+lua
if you are to busy or just don't want to, then I understand, we all have busy lives, i will just carry on with the external dll, but if you could then I would be eternally grateful
I have been working with PB and lua for some time making internal tools for the company I work for, my boss has asked me to update the lua engine in our main database engine (custom engine written in PB and lua) from 5.1.2 to 5.1.4
I have added the 5.1.4 lib and dll to the engine and it works very well but I would like a static lib for the sake of portability, like the 5.1.2 lib at the RealSource website
is there any chance of getting the lib recompiled with the current stable version of lua (5.1.4), this would save me a huge headache as the task has fallen on my shoulders and I am no C++ dev, im strictly PB+lua
if you are to busy or just don't want to, then I understand, we all have busy lives, i will just carry on with the external dll, but if you could then I would be eternally grateful
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Re: Embedding LUA in PureBasic!?
V5.1.4 would be useful.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
Re: Embedding LUA in PureBasic!?
http://luaforge.net/frs/download.php/37 ... w4_lib.zip
Extract to your lib directory and change the import to "liblua5.1.a".
Extract to your lib directory and change the import to "liblua5.1.a".
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Re: Embedding LUA in PureBasic!?
thanks. 

https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
Re: Embedding LUA in PureBasic!?
many thanks, i had given up on the idea and resided myself to using the dll, you just made my day, thanks again 

- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Re: Embedding LUA in PureBasic!?
Here is the latest include file built and tested for the new PureBasic 5.50b3
https://dl.dropboxusercontent.com/u/171 ... lua514.zip
I have no Lua 5.1.4 osx lib though that will work - can anyone help?
https://dl.dropboxusercontent.com/u/171 ... lua514.zip
I have no Lua 5.1.4 osx lib though that will work - can anyone help?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system