Fresh Pair of Eyes
- Posted by Icy_Viking Apr 06, 2023
- 551 views
Hello all,
I was recently working on a wrapper for Tilengine. However, it seems that the library or DLL is not being loaded at all. I can't figure out why. The code itself is fine. The program runs, but is returning 0 and -1, thus the DLL is not being loaded. Maybe I'm overlooking something simple?
include std/ffi.e include std/machine.e include std/os.e include std/math.e public atom tile = 0 ifdef WINDOWS then tile = open_dll("Tilengine.dll") --This is how its spelled from the actual DLL ? tile --returns 0 elsifdef LINUX or FREEBSD then tile = open_dll("libTilengine.so") end ifdef export constant xTLN_Init = define_c_func(tile,"+TLN_Init",{C_INT,C_INT,C_INT,C_INT,C_INT},C_INT) ? xTLN_Init --returns -1 public function TLN_Init(atom hres,atom vres,atom numlayers,atom numsprites,atom numani) return c_func(xTLN_Init,{hres,vres,numlayers,numsprites,numani}) end function