lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Am 01.04.2014 14:36 schrieb steve donovan:
On Tue, Apr 1, 2014 at 2:14 PM, Moose <moose@posteo.de> wrote:
    local ffi = require("ffi")
    ffi.cdef[[
      __declspec(dllexport) void code_to_be_invoked_by_lua();
    ]]
Hm, does LuaJIT FFI actually understand __declspec at all?  Remember
it does not understand  full C syntax.  I'd try this one without this
decoration.
I understand it does. At least the stackoverflow link I posted earlier 
proposed this as a solution. Also, their docs here 
http://luajit.org/ext_ffi_api.html suggest they do, although they don't 
mention it specifically. But yeah, of course I tried without and it 
didn't cut it.
Right now I am trying to create a C++ LuaWrapper using this 
https://bitbucket.org/alexames/luawrapper/src and see if I can pass a 
living object into the context to use that. Maybe that's a better 
approach anyway.
Cheers,
Moose