Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
twall committed Jun 2, 2013
1 parent 13b2d7c commit 4f3dcfd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/com/sun/jna/NativeLibrary.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
* resource will be extracted to <code>jna.tmpdir</code> for loading, and
* later removed (but only if <code>jna.nounpack</code> is false or not set).
* </ol>
* You may set the system property <code>jna.debug_load=true</code> to make
* JNA print the steps of its library search to the console.
* @author Wayne Meissner, split library loading from Function.java
* @author twall
*/
Expand Down
6 changes: 5 additions & 1 deletion www/FrequentlyAskedQuestions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ I'm having trouble generating correct library mappings
------------------------------------------------------
Make sure you've read [this page](https://github.com/twall/jna/tree/master/www/Mappings.md) and [this one](http://twall.github.com/jna/3.4.0/javadoc/overview-summary.html#overview_description). Try [JNAerator](http://code.google.com/p/jnaerator/). If you find its output too verbose, delete the mappings you don't need, or copy out the ones you do need.

Calling `Native.loadLibrary()` causes an UnsatisfiedLinkError
-------------------------------------------------------------

Set the system property `jna.debug_load=true`, and JNA will print its library search steps to the console. `jna.debug_load.jna` will trace the search for JNA's own native support.

My library mapping causes an UnsatisfiedLinkError
-------------------------------------------------

Use a dump utility to examine the names of your exported functions to make sure they match (nm on linux, [depends](http://www.dependencywalker.com/) on Windows). On Windows, if the functions have a suffix of the form "@NN", you need to pass a `StdCallFunctionMapper` as an option when initializing your library interface. In general, you can use a function mapper (`FunctionMapper`) to change the name of the looked-up method, or an invocation mapper (`InvocationMapper`) for more extensive control over the method invocation.


How do I map a native `long` type?
----------------------------------

Expand Down

0 comments on commit 4f3dcfd

Please sign in to comment.