DLL application import problem [message #164107] |
Mon, 20 February 2006 06:42  |
Eclipse User |
|
|
|
Originally posted by: jpilecki.poczta.onet.pl
Hello,
I'm not sure my question shoud be sent to this newsgroup, being more JNI
than CDT problem, but since there is no group dedicated to JNI, I'm sending
it here.
I'm trying to translate a program from pure java to eclipse enviroment.
It's mainly extensive DLL library with only bits of code in form of
interface. It works just fine with java, but attempt to use eclipse causes
problems. I'm receiving "unsatisfiedLinkError" in response.
Most of those problem steems from a fact, that I have no access to it's
actual code.
I have:
- dll library
- several >already compiled< *.class files, serving as intercafe
- code that works in pure java
I tried:
- writing my own "native"
- decompiling *.class files
What I cannot do:
- ask 'dll' creator for help
- use oryginal *.java files as interface
- create proper CDT project (I do not have source codes)
JAVA CODE (working):
public class jex1 {
static {
try { System.loadLibrary("qcs"); }
catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load.\n" + e);
System.exit(1);
}
}
public static void main(String argv[]) {
qcs.initialize_qcs_core_library();
}
}
ECLIPSE CODE (not working)
public class class1 {
static {
try { System.loadLibrary("qcs"); }
catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load.\n" + e);
System.exit(1);
}
}
public static void main(String argv[]) {
qcs.initialize_qcs_core_library();
}
}
ERROR MESSAGE:
Exception in thread "main" java.lang.UnsatisfiedLinkError:
initialize_qcs_core_library
at def.qcsJNI.initialize_qcs_core_library(Native Method)
at def.qcs.initialize_qcs_core_library(qcs.java:1143)
at pack1.class1.main(class1.java:39)
I would be gratefull for any help.
Jakub Pilecki
|
|
|
|
Powered by
FUDForum. Page generated in 0.02882 seconds