C Lua Api使用lua5.1但不使用qlua解释器

时间:2017-05-03 12:21:19

标签: lua lua-c++-connection qlua

我正在使用Lua进行深度学习,我的主要翻译是 qlua 。我需要从基于C的应用程序获取图像流。为此,我需要将Lua与C接口以访问图像流。我经历了几个C Lua Api教程,发现这个与Lua5.1完美配合。 lua c wrapping

问题是,当我使用qlua作为此代码的解释器时,它不起作用并且给我以下错误:

LUA CODE

require "power"
print(square(1.414213598))
print(cube(5))

错误

/home/brainy/LuaCApiTest/CallCfromLua/hellofunc.lua:5: module 'power' not found:
    no field package.preload['power']
    no file './power.lua'
    no file '/usr/local/share/luajit-2.0.4/power.lua'
    no file '/usr/local/share/lua/5.1/power.lua'
    no file '/usr/local/share/lua/5.1/power/init.lua'
    no file './power.lua'
    no file './power/init.lua'
    no file './lua/power.lua'
    no file './lua/power/init.lua'
    no file '/opt/zbstudio/lualibs/power/power.lua'
    no file '/opt/zbstudio/lualibs/power.lua'
    no file '/opt/zbstudio/lualibs/power/power/init.lua'
    no file '/opt/zbstudio/lualibs/power/init.lua'
    no file './power.so'
    no file '/usr/local/lib/lua/5.1/power.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'
    no file '/opt/zbstudio/bin/linux/x64/libpower.so'
    no file '/opt/zbstudio/bin/linux/x64/clibs/power.so'
    no file '/opt/zbstudio/bin/linux/x64/clibs/libpower.so'
stack traceback:
    [C]: in function 'require'
    /home/brainy/LuaCApiTest/CallCfromLua/hellofunc.lua:5: in main chunk

使用qlua解释器可以解决这个问题吗?

0 个答案:

没有答案