Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: Human on July 29, 2020, 05:41:45 AM
-
Hello
is it possible to integrate the Lua ALIEN package/addon in mach4?
I need Alien to call functions in dynamic libraries.
I have copied the Alien Folder and alien.lua to Mach4 Modules.
But if i started my code in debugging mode and "require "alien"" is calling, at this point "local core = require "alien.core"" the Debugging session will be closed without errors.
Maybe because of the missing Luarocks extension?
With my sepetrate LUA 5.1 installation the Alien calls works fine and without errors.
Can anyone help me?
Thanks
Robert
translated by google and myself
-
We are running LUA 5.3. I don't know much about alien, but you might have to up the version to 5.3 as well.
Steve
-
Hi Steve
If I understand that correctly, Alien can be run with Lua 5.3.
https://github.com/mascarenhas/alien
I tried to update my Lua 5.1 installation to 5.3 (lua.exe, luac.exe, wlua.exe, lua53.dll).
But when I run "require" wx "" or "require" alien "" I get the following error:
lua: error loading module 'alien.core' from file 'F: \ Program Files \ Systemtools \ Lua 5.1 \ clibs \ alien \ core.dll':
% 1 is not a valid Win32 application
I don't know why.
I don't know what to do with ZeroBraneStudio and Alien either.
Maybe paths are wrong or missing files that Alien needs, I don't know.
I only started learning Lua a few months ago.
Maybe I will find another solution to get to my external dll functions.
thanks
Robert
-
Yes, it will work with either 5.1 or 5.3, but the binaries better match the version of LUA that you are using. Right now, it looks like your alien was compiled for LUA 5.1. So you need to get alien that is compiled to use LUA 5.3. I think that is all you need.
Once you upgrade your alien from 5.1 to 5.3, Zerobrane won't have an issue with it.
Steve