I made a test.dll with Luabind, but T-engine is crash down.
I tested Lua51.exe, in this case, Lua51.exe did not crash, and very well done my dll.
can I use other library(dll file) in Lua script called by T-engine?
==== source code of test.dll =========
#include <iostream>
#include <luabind/luabind.hpp>
void greet()
{
std::cout << "hello world!\n";
}
extern "C" int __declspec(dllexport) initMyTest(lua_State* L)
{
using namespace luabind;
open(L);
module(L)
[
def("greet", &greet)
];
return 0;
}
=================
and call it in lua script
====== test.lua =====
function myTest()
package.loadlib("test.dll", "initMyTest")() <== crash down
greet()
end
=================
can I use other library(dll file) in Lua script?
Moderator: Moderator
Re: can I use other library(dll file) in Lua script?
ToME uses LuaJIT, not Lua 5.1. I don't know if the two are ABI-compatible on Windows, but I don't think they are, so that may be the source of your problem.
Re: can I use other library(dll file) in Lua script?
Thank you, it's very useful help.Castler wrote:ToME uses LuaJIT, not Lua 5.1. I don't know if the two are ABI-compatible on Windows, but I don't think they are, so that may be the source of your problem.
