The symbol exported by the DLL is probably "Connect@16", not
"Connect". If you pass an instance of StdCallFunctionMapper
(StdCallLibrary.FUNCTION_MAPPER) to your library init options, that
should fix the link error, e.g.
Map options = new HashMap();
options.put(Library.OPTION_FUNCTION_MAPPER,
StdCallLibrary.FUNCTION_MAPPER);
MyLib lib = (MyLib)Native.loadLibrary("mylib", MyLib.class, options);
On Aug 21, 2007, at 11:24 AM, Kay W wrote:
I was able to solve my initial problem by making the INSTANCE
variable static.
However, I have encountered a new problem (this is the same
exception I ran into while attempting a JNI implementation). Any
assistance would be helpful!
Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot
locate function 'Connect'
at com.sun.jna.NativeLibrary.getFunctionAddress
(NativeLibrary.java:191)
at com.sun.jna.Function.<init>(Function.java:103)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:
178)
at com.sun.jna.Library$Handler.invoke(Library.java:140)
at $Proxy0.Connect(Unknown Source)
at rda2.rda2.main(rda2.java:24)
Thanks!
born2Java
_________________________________________________________________
See what you’re getting into
before you go there http://newlivehotmail.com/?
ocid=TXT_TAGHM_migration_HM_viral_preview_0507