我一直在尝试安装api,但是它没有工作,一直存在这个错误
stdin:1: module 'Desktop/luafilesystem-master' not found:
no field package.preload['Desktop/luafilesystem-master']
no file '/usr/local/share/lua/5.3/Desktop/luafilesystem-master.lua'
no file '/usr/local/share/lua/5.3/Desktop/luafilesystem-mast
我的Lua脚本是由编译的,编译后的脚本模块在台式机(osx10.7.5)上运行良好。但是当我在Android phone (Android 2.3.6)上运行它时,它总是失败并抱怨attempt to call a string value。同样的脚本也可以在相同的手机中以脚本(未编译)的方式运行,而不会出现问题。
测试中使用了Lua 5.1.5和Android NDK r8b。
logcat中的错误:
12-26 09:40:26.934: E/libb22luapre(8190): Failed to run script: attempt to call a string value
C
我目前正在努力在Ubuntu14.04下配置和构建pepper ()。
我对Lua 5.2的配置失败。正确的configure-command-line是什么?
$./configure --prefix=/tmp/pepper
configure:7587: found /usr/bin/lua
configure:7599: result: /usr/bin/lua
configure:7637: checking Lua version is in range 501 <= v <
configure:7662: result: no
configure:76
我试图安装进行实验,但遇到了障碍。
解压后,我看到了三个文件夹:opencv、generic-pc和generic-embedded。编译两个通用文件夹后,我尝试运行所有三个文件夹,但三个都失败了。
当我尝试运行generic-pc时,它会给我带来:
Number of threads used: 8
qlua: ./frame.lua:63: module 'linuxcamera' not found:
no field package.preload['linuxcamera']
no file '/home/dave/.luaro
我有一个c++ (遗留)应用程序,它调用一些lua脚本来实现一些功能。
现在,我正在编写一个新的c++库,应该从该lua脚本中调用它。
#include <lua.hpp>
extern "C" {
static int isquare(lua_State *L){ /* Internal name of func */
return 1; /* One return value */
}
static int icube(lua_State *L){
我有一个文件configuration.cpp:
#include "configuration.hpp"
struct game_config* get_game_config(lua_State *L, char* script)
{
debug("Attempting to load configuration from %s", script);
// Execute the script
luaL_dofile(L, script);
// The environment should now be prepped,
假设我们有以下函数定义
int function_wrapper_dummy( lua_State* ) { }
template < typename F, F* f >
int function_wrapper( lua_State* L ) { }
和下面的函数
template < typename F >
void register_function( F f )
{
int (*lf) (lua_State *L) = function_wrapper_dummy; // line 1
int (*lf) (lua_State *L)
我试图让luasocket在的lua脚本环境中工作,但到目前为止还没有成功。我下载了luasocket 的版本,确保安装了vc8,并检查了bizhawk: 5.1附带的lua版本。
但是,当我启动脚本时,我会得到以下错误:
LuaInterface.LuaScriptException: error loading module 'socket.core' from file './libs/socket\core.dll':
Das angegebene Modul wurde nicht gefunden. (the given module was
我是Lua的新手,使用了一些教程,尝试了一些基本的东西,比如编写通用算法等。
但是我在我的mac os机器上使用lua解释器时遇到了一些问题。
例如,我们有一个名为'sample.lua‘的文件,其中包含以下代码行:
function fib(n) return n<2 and n or fib(n-1)+fib(n-2) end
如何从终端运行该函数?如果我不使用任何函数,我只需要使用'lua script.lua‘来调用脚本-工作!
下一个问题是关于非编译的lua-source和编译的lua-source之间的基本理解。为什么lua代码不需要编译就可以运行,就像我之前