Re: cannot use swig native shared libraries

2011-06-21 Thread Aaron Cohen
Sorry to perform thread necromancy, but I believe that this problem is the same that I found a workaround for in a recent thread, and would love if you could confirm that a similar solution fixes this for you? The thread is: https://groups.google.com/d/topic/clojure/br_sTSuWBJ8/discussion For me,

Re: cannot use swig native shared libraries

2009-06-17 Thread Antonio, Fabio Di Narzo
With the relatively recent release of clojure 1.0.0, I decided to give another try to using SWIG-generated native libraries with it. It still doesn't work on my box: I get an "UnsatisfiedLinkError" exception when trying to call a native function. Still, calling the function from plain Java code wo

Re: cannot use swig native shared libraries

2009-04-29 Thread Antonio, Fabio Di Narzo
2009/4/29 Tony Hursh : > > > On Apr 27, 2009, at 8:45 PM, jim wrote: > >> >> 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

Re: cannot use swig native shared libraries

2009-04-29 Thread Tony Hursh
On Apr 27, 2009, at 8:45 PM, jim wrote: > > 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

Re: cannot use swig native shared libraries

2009-04-28 Thread Antonio, Fabio Di Narzo
2009/4/28 Rich Hickey : > > > > On Apr 22, 9:41 am, "Antonio, Fabio Di Narzo" > 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 minima

Re: cannot use swig native shared libraries

2009-04-28 Thread Rich Hickey
On Apr 22, 9:41 am, "Antonio, Fabio Di Narzo" 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 fil

Re: cannot use swig native shared libraries

2009-04-28 Thread Antonio, Fabio Di Narzo
2009/4/28 jim : > > 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 > cl

Re: cannot use swig native shared libraries

2009-04-27 Thread jim
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 m

Re: cannot use swig native shared libraries

2009-04-23 Thread Antonio, Fabio Di Narzo
Thank you for the suggestion, but doesn't help. Note again that I use it with no problems with plain java: ---file:SwigTest.java--- import swig_test.swig_test; public class SwigTest { public static void main(String[] args) { System.load(System.getProperty("user.dir") + "/libswig_test

Re: cannot use swig native shared libraries

2009-04-22 Thread Dimiter "malkia" Stanev
I might be wrong, but shouldn't you compile the .c file to .o with "-fpic", and then link with ld with "-shared"? maybe just adding "-fpic" to: gcc -fpic -shared ${JNI_CFLAGS} swig_test_wrap.c -o libswig_test.so might do it. On Apr 22, 6:41 am, "Antonio, Fabio Di Narzo" wrote: > Hi all. > I'

cannot use swig native shared libraries

2009-04-22 Thread Antonio, Fabio Di Narzo
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