hx-ffi
hx-ffi copied to clipboard
Haxe 3 FFI library
Fixes for HXCPP target
Hi. I tried to use this library for C++ target (Linux x64). [With some changes](https://github.com/TomBebbington/hx-ffi/compare/master...r3d9u11:master) it can be compiled and work fine with simple data types (Int, Float, etc...). But...
Memcpy routine of structs is incorrect with regards to memory allocation of structs by c++ compilers
typedef struct { int a; char\* b; } St_n; The c++ standard does not specify a standard way of padding/allocating structs in memory. As such the current routine, though useful...
``` #include #include #include typedef struct { int i; } St_n; char* test(St_n st) { char res[1024]; sprintf(res,"st %d",st.i); return res; } package ; import ffi.lib.EasyLibrary; @:struct(St_n=>{ var i:Int; })...
typedef Pointer = ffi.native.neko.Pointer; the neko conditional compilation points to node and vice versa.
Can I use this library to access methods inside native dll? What I need is to get hardware id string at windows, I found a native dll that can get...
Not experienced in building C, so may be something simple. Using latest hxcpp + cygwin. Configure seems to pass ok ``` haxelib run hxcpp Build.xml cl.exe -Ilibffi/bin/include -nologo -O2 /WX-...