luaJIT FFI
andi via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Tue Apr 12 02:23:00 PDT 2016
On Monday, 11 April 2016 at 15:18:47 UTC, Dan Olson wrote:
> andi <cadetschimmel at gmail.com> writes:
>> next i did was to call into luaJIT from D, working as
>> expected. then i
>> thought, ok
>> no problem to do vice versa, but i ran into problems. im not
>> sure how
>> to properly export
>> those symbols into c global namespace, or maybe i get something
>> totally wrong. doing extern (C) and defining my functions, but
>> im
>> having troubles to call them via luaJIT FFI.
>
> Hi,
>
> Can you post details on the problem? Is it a link time error or
> runtime? OS (e.g Linux)? Is main controlled by Lua (not using
> a D
> main)? If so, you will need to initialize D runtime (rt_init or
> Runtime.initialize).
Im using win7 and win10, visual studio 2013 + VisualD and
ldc2-0.15.2-beta2-win64-msvc.
and im using luaJIT 2.1 beta2
i think its easier to simply upload everything i got so far, so
here it is my current project:
http://seed-engine.com/downloads/seed2_sdk.zip
in src/seed2/main.d is my int main()
in bin/core/core.lua im testing luaJITs FFI
thx again
More information about the digitalmars-d-ldc
mailing list