自分のプロジェクト (C++ VS2015 & lua 5.3) を luasocket 経由で ZeroBrane IDE デバッガーに接続すると、すべて期待どおりに動作します。
package.path = package.path .. ';./scripts/zerobrane/?.lua'
package.cpath = package.cpath .. ';./scripts/zerobrane/?.dll'
local debugger = require('mobdebug.mobdebug')
debugger.start()
したがって、このプロジェクトを実行してデバッグできます。
しかし、私の別のプロジェクト (C++ VS2013 & lua 5.1) では、まったく同じことをしようとしていますが、エラーが発生しました:
2016.05.17/17:33:39> lua_wrapper.cpp(47): Lua: error loading module 'socket.core'
from file 'D:/project2/scripts/zerobrane/socket\core.dll':
The specified module could not be found.
LUA Call stack:
. C <no name>
. C require
. main <no name> - ./scripts/zerobrane/socket.lua:12
. C require
. main <no name> - ./scripts/zerobrane/mobdebug\mobdebug.lua:101
. C require
. main <no name> - ./scripts/luadebug.lua:5
. C require
. main <no name> - ...\scripts\main.lua:6
dll へのパスは正しいです。また、そのフォルダーに ZeroBraneStudio パッケージとは異なる core.dll を配置しようとしましたが、うまくいきませんでした:
- ZeroBraneStudio\bin\clibs\socket\core.dll
- ZeroBraneStudio\bin\clibs52\socket\core.dll
- ZeroBraneStudio\bin\clibs53\socket\core.dll
VS2013 で core.dll を自分でコンパイルするつもりでしたが、適切なソース コードが見つかりません。これhttp://files.luaforge.net/releases/luasocket/luasocket/luasocket-2.0-beta2は socket.dll のみを生成します (core.dll が何も与えないように名前を変更します)。
何か案は?