I'm using ZeroBrane as an IDE. When I select
Lua as the interpreter, then hit execute on the file
main.lua:
Code: Select all
os.execute([[gcc -shared -fPIC -o libtest.so test.c]])
local ffi = require"ffi"
local ltest = ffi.load"./libtest.so"
ffi.cdef[[
int ret();
]]
print(ltest.ret())
where
test.c is:
Then 124 just gets printed out, as expected. But if I select
LÖVE as the interpreter, I get an error:
Code: Select all
Error: main.lua:4: cannot load module './libtest.so': %1 is not a valid Win32 application.
This seems to be the same for 0.10.2 and 11.1 . I thought that since LÖVE already uses LuaJIT, there shouldn't be problems like this, but maybe it's ZB's fault?