D with gmp via swig

2011-08-14 Thread Oliver
Hello I am trying to get to a gmp interface for D2. I have some trouble to get that to work, however. Perhaps someone has an idea what I am doing wrong. I must admit I am not sure this is a D issue or a swig issue or something else. The interface file for swig cat gmpd.i %module gmpd %{ #include

Re: D with gmp via swig

2011-08-14 Thread Iain Buclaw
== Quote from Oliver (oliver.ruebenkoe...@web.de)'s article > Hello I am trying to get to a gmp interface for D2. I have some trouble to get > that to work, however. Perhaps someone has an idea what I am doing wrong. I > must admit I am not sure this is a D issue or a swig issue or something else.

Re: D with gmp via swig

2011-08-14 Thread Oliver
Thanks Iain, I'll contact the swig team about it. Oliver

Re: D with gmp via swig

2011-08-14 Thread David Nadlinger
On 8/14/11 1:29 PM, Oliver wrote: Hello I am trying to get to a gmp interface for D2. I have some trouble to get that to work, however. Perhaps someone has an idea what I am doing wrong. I must admit I am not sure this is a D issue or a swig issue or something else. […] /opt/usr/local/bin/gdc

Re: D with gmp via swig

2011-08-14 Thread Caligo
Shouldn't there be an interface to GMP and MPFR in Phobos by default?

Re: D with gmp via swig

2011-08-14 Thread Oliver
Thanks David, so when I gcc -fPIC -c gmpd_wrap.c gcc -shared -Wl,-soname,libgmpd_wrap.so.1 -o libgmpd_wrap.so.1.0.1 gmpd_wrap.o -lgmp ln -s libgmpd_wrap.so.1.0.1 libgmpd_wrap.so /opt/usr/local/bin/gdc main.d gmpd.d gmpd_im.d -I. -L. -lgmpd_wrap I get the /usr/bin/ld: __gmpn_ior_n: TLS definit

Re: D with gmp via swig

2011-08-14 Thread David Nadlinger
On 8/14/11 2:34 PM, Oliver wrote: /opt/usr/local/bin/gdc main.d gmpd.d gmpd_im.d -I. -L. -lgmpd_wrap You don't need to link the .so in (although I'm surprised to see that it produces linker errors, I didn't remember that there are name collisions with the default settings), it will be loaded

Re: D with gmp via swig

2011-08-14 Thread Oliver
== Quote from David Nadlinger (s...@klickverbot.at)'s article > On 8/14/11 2:34 PM, Oliver wrote: > > /opt/usr/local/bin/gdc main.d gmpd.d gmpd_im.d -I. -L. -lgmpd_wrap > You don't need to link the .so in (although I'm surprised to see that it > produces linker errors, I didn't remember that there

Re: D with gmp via swig

2011-08-14 Thread David Nadlinger
On 8/14/11 3:03 PM, Oliver wrote: I did have to copy the libgmpd_wrap* to some place were the linker could find it, of course. Alternatively, you could set LD_LIBRARY_PATH to where your library resides. If there is demand, I could definitely look into adding static linking support to SWIG (i

Re: D with gmp via swig

2011-08-14 Thread Oliver
== Quote from David Nadlinger (s...@klickverbot.at)'s article > On 8/14/11 3:03 PM, Oliver wrote: > > I did have to copy the libgmpd_wrap* to some place were the linker could > > find it, > > of course. > Alternatively, you could set LD_LIBRARY_PATH to where your library > resides. If there is dem

Re: D with gmp via swig

2011-08-14 Thread Andrej Mitrovic
This seems ancient, but maybe it could help: http://www.dsource.org/projects/bindings/browser/trunk/gmp