Fresh Pair of Eyes

new topic     » topic index » view thread      » older message » newer message

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 
new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu