I'm trying to set up InterProlog in eclipse.
My path variable already has the path to jdk1.7 and I already have xsb installed. I attached interprolog.jar as an external jar, added the xsb to my path variable (C:\Users\MyName\config\x86-pc-windows\bin), and I added the path to my xsb bin to the NativeEngine constructor (See below).
When I run the HelloWorld program:
PrologEngine engine = new NativeEngine("C:\\Users\\MyName\\xsb\\bin");
engine.command("import append/3 from basics");
Object[] bindings = engine.deterministicGoal("name(User,UL),append(\"Hello,\", UL, ML), name(Message,ML)", "[string(User)]", new Object[]{System.getProperty("user.name")}, "[string(Message)]");
String message = (String)bindings[0];
System.out.println("\nMessage:"+message);
bindings = engine.deterministicGoal("name('"+System.getProperty("user.name")+"',UL),append(\"Hello,\", UL, ML), name(Message,ML)","[string(Message)]");
System.out.println("Same:"+bindings[0]);
System.exit(0);
I get (from the first line):
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.xsb.interprolog.NativeEngine.xsb_setDebug(Z)V
at com.xsb.interprolog.NativeEngine.xsb_setDebug(Native Method)
at com.xsb.interprolog.NativeEngine.<init>(NativeEngine.java:89)
at com.xsb.interprolog.NativeEngine.<init>(NativeEngine.java:52)
at com.xsb.interprolog.NativeEngine.<init>(NativeEngine.java:48)
at HelloWorld.main(HelloWorld.java:12)
Any ideas on how to solve? Thanks :)