Re: Euphoria Wrapper Problem
- Posted by jimcbrown (admin) Jun 03, 2015
- 1907 views
Icy_Viking said...
Hello,
I am having the following issue while trying to make an example program. The error says bad routine number (-1).
I've tried looking at all the different files, but I can't see anything wrong or why it would come up with a bad routine error. Am I declaring something wrong, is the DLL I'm using bad? When I run the wrapper file, which is .ew, it runs fine, no errors or anything. However, when I try to run an actual program using the wrapper, I get the bad routine error. Any help is greatly appericated.
Try modifying your wrapper like this:
--Wrapper code if ttf = 0 then puts(2, "Load of Library ttf failed!\n") end if public constant xTTF_Init = define_c_func(ttf,"TTF_Init",{},C_INT) if xTTF_Init = 0 then puts(2, "Load of function TTF_Init failed!\n") end if public function TTF_Init() return c_func(xTTF_Init,{}) end function
And let us know what the output is.