lua-users home
lua-l archive

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

Dušan Majkić wrote:
> Is there a way to export from windows exe app and import to LuaJIT FFI?

The exported symbols of the EXE are part of the default ffi.C
namespace. So just mark your functions with __declspec(dllexport)
or give the linker a list of symbols to export. This works for
both DLLs and EXEs.

Next declare the C functions with ffi.cdef as usual and then use
the ffi.C namespace to call them.