« Return to Thread: loadlib problems

Re: loadlib problems

by Christian Walther :: Rate this Message:

Reply to Author | View in Thread

Aidan Gauland wrote:
> I'm want to write a plug-in for Pipmak, so I tried using the example  
> plug-in that comes with Pipmak, but I keep getting "attempt to call  
> a nil value" when I try this.

>
> loadlib("hello.so", "init")()

loadlib() returns nil when it can't load the library. Check the second  
and third return values in that case, the second is an error message  
and the third "open" or "init" depending on whether the error was in  
opening the library or in finding the function.

I suspect that your error is "file not found" - the library will  
certainly not be found inside a zipped project, and even in an  
unzipped project, unless you changed the working directory to there,  
it won't be found inside the node if you just say "hello.so" without a  
path.

(As noted in commit message 188: "plugin support is quick-and-dirty  
for now, there is no standard way to locate plugins, and no formal API  
for plugins to interact with Pipmak". The former issue will be  
addressed in the real module support that I should be working on.)

   -Christian

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Pipmak-Users mailing list
Pipmak-Users@...
news://news.gmane.org/gmane.games.devel.pipmak.user
https://lists.sourceforge.net/lists/listinfo/pipmak-users

 « Return to Thread: loadlib problems