summaryrefslogtreecommitdiff
path: root/Doc/Manual/Lua.html
diff options
context:
space:
mode:
authorMark Gossage <mark@gossage.cjb.net>2006-02-24 03:17:51 +0000
committerMark Gossage <mark@gossage.cjb.net>2006-02-24 03:17:51 +0000
commitfad49549ea72f2ba99419222cfa9e06d7b2d9b9e (patch)
tree0b2d0c0d99ea97d3d5750326008702194c3d38ed /Doc/Manual/Lua.html
parent72fd0c51ab35141fe3f4ed43431fcbbd5eee807b (diff)
downloadswig-fad49549ea72f2ba99419222cfa9e06d7b2d9b9e.tar.gz
Small update Lua documents on troubleshooting problems
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8889 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Doc/Manual/Lua.html')
-rw-r--r--Doc/Manual/Lua.html31
1 files changed, 31 insertions, 0 deletions
diff --git a/Doc/Manual/Lua.html b/Doc/Manual/Lua.html
index 989e07e07..87d5d287a 100644
--- a/Doc/Manual/Lua.html
+++ b/Doc/Manual/Lua.html
@@ -173,6 +173,37 @@ The wrappers produced by SWIG can be compiled and linked with Lua 5.1. The loadi
require("example")
</pre></div>
+<p>
+If the code didn't work, don't panic. The best thing to do is to copy the module and your interpreter into a single directory and then execute the interpreter and try to manually load the module (take care, all this code is case sensitive).
+</p>
+<div class="targetlang"><pre>
+a,b,c=loadlib("example.so","Example_Init") -- for Unix/Linux
+--a,b,c=loadlib("example.dll","Example_Init") -- for Windows
+print(a,b,c)
+</pre></div>
+<p>
+Note: for Lua 5.1:<br>
+The loadlib() function has been moved into the package table, so you must use package.loadlib() instead.
+</p>
+<p>
+if 'a' is a function, this its all working fine, all you need to do is call it
+<div class="targetlang"><pre>
+ a()
+</pre></div>
+to load your library which will add a table 'example' with all the functions added.
+</p>
+<p>
+If it doesn't work, look at the error messages, in particular mesage 'b'<br>
+<tt> The specified module could not be found.</tt><br>
+Means that is cannot find the module, check your the location and spelling of the module.<br>
+<tt> The specified procedure could not be found.</tt><br>
+Means that it loaded the module, but cannot find the named function. Again check the spelling, and if possible check to make sure the functions were exported correctly.<br>
+<tt> 'loadlib' not installed/supported</tt><br>
+Is quite obvious (Go back and consult the Lua documents on how to enable loadlib for your platform).
+</p>
+
+
+
<H3><a name="Lua_nn6"></a>22.2.3 Using your module</H3>