Lua在C++ API中找不到模块?

我正在C++应用程序中调用Lua。我有几个Lua文件需要调用,如 RunAPI_1208.luaJSON.lua等。所有Lua文件都是通过 main.lua 调用的。但在C++中,我运行所有文件,最后运行 main.lua。我遇到了这个问题。我正在使用 Cocos2d-x 2.2.6。我该如何解决它?

[string "Main.lua"]:9: module 'RunAPI_1208' not found:
    no field package.preload['RunAPI_1208']
    no file './RunAPI_1208.lua'
    no file '/usr/local/share/lua/5.1/RunAPI_1208.lua'
    no file '/usr/local/share/lua/5.1/RunAPI_1208/init.lua'
    no file '/usr/local/lib/lua/5.1/RunAPI_1208.lua'
    no file '/usr/local/lib/lua/5.1/RunAPI_1208/init.lua'
    no file './RunAPI_1208.so'
    no file '/usr/local/lib/lua/5.1/RunAPI_1208.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'
Cocos2d: [string "Main.lua"]:9: module 'RunAPI_1208' not found:
    no field package.preload['RunAPI_1208']
    no file './RunAPI_1208.lua'
    no file '/usr/local/share/lua/5.1/RunAPI_1208.lua'
    no file '/usr/local/share/lua/5.1/RunAPI_1208/init.lua'
    no file '/usr/local/lib/lua/5.1/RunAPI_1208.lua'
    no file '/usr/local/lib/lua/5.1/RunAPI_1208/init.lua'
    no file './RunAPI_1208.so'
    no file '/usr/local/lib/lua/5.1/RunAPI_1208.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'

而这就是我的 main.lua:

local run = require("RunAPI_1208")
点赞