2009/4/28 jim <[email protected]>: > > Hey Antonio, > > I'm getting a similar error. I wanted to call setuid from Clojure, so > I followed this link's example: > http://www2.sys-con.com/itsg/virtualcd/Java/archives/0510/Silverman/index.html > > to build a java class and a shared library. I added the class to my > classpath and was able to import my UID class. But when I tried to > call the UID.setuid method, it gave me that UnsatisfiedLinkError. Did > you find a solution to your problem?
Unfortunately, no. a. > > Jim > > On Apr 22, 8:41 am, "Antonio, Fabio Di Narzo" > <[email protected]> wrote: >> Hi all. >> I'm having problems with using swig-generated wrappers with Clojure. >> I'm running ubuntu-8.04-i386, gcc-4.2.4, swig-1.3.33, openjdk-1.6.0, >> latest clojure release. >> >> I've cut down a minimal reproducible example. >> The swig file: >> ---file:swig_test.i--- >> %module swig_test >> %{ >> int swig_test_whatever() { >> return 3;} >> >> %} >> int swig_test_whatever(); >> ---cut--- >> >> Compile with: >> ---cut--- >> mkdir swig_test >> swig -java -package swig_test -outdir swig_test swig_test.i >> javac swig_test/*.java >> export JAVA_HOME=/usr/lib/jvm/java-6-openjdk >> export JNI_CFLAGS="-I${JAVA_HOME}/include -I${JAVA_HOME}/include/ >> linux" >> gcc -shared ${JNI_CFLAGS} swig_test_wrap.c -o libswig_test.so >> ---cut--- >> >> The swig-generated java itfc file is: >> ---file:swig_test/swig_test.java--- >> package swig_test; >> public class swig_test { >> public static int swig_test_whatever() { >> return swig_testJNI.swig_test_whatever(); >> }} >> >> ---cut--- >> >> The clojure code: >> ---cut--- >> (import '(swig_test swig_test)) >> >> (System/load >> (.concat (System/getProperty "user.dir") "/libswig_test.so")) >> (swig_test/swig_test_whatever) >> ---cut--- >> I get: >> java.lang.UnsatisfiedLinkError: >> swig_test.swig_testJNI.swig_test_whatever()I (NO_SOURCE_FILE:0) >> >> I can use "manually written"JNIwrappers with clojure and, vice- >> versa, swig-generated wrappers with plain java code. What I'm missing >> here? Anybody can help? >> >> Bests, >> Antonio, Fabio Di Narzo. > > > -- Antonio, Fabio Di Narzo Ph.D. student at Department of Statistical Sciences University of Bologna, Italy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---
