Re: C Function Pointer Wrapping Example not working

2008-11-18 Thread Charlie
> Nowhere in your code is the definition of binary_op - that is why you > get a linker error. > > Is it defined in another C file?  If so you need to link it with the > swig wrapper before you make the .so > Thanks for pointing out. I sorted the code out finally! Charlie -- http://mail.python.or

Re: C Function Pointer Wrapping Example not working

2008-11-17 Thread Nick Craig-Wood
Charlie <[EMAIL PROTECTED]> wrote: > > > > > > ?But when I try to import test in python, it complains: > > > ?import _test > > > ?ImportError: ./_test.so undefined symbol: _Z9binary_opiiPFiiiE > > > > The above is a mangled name so you've got some C vs C++ problems I'd > > say. > > > > You could t

Re: C Function Pointer Wrapping Example not working

2008-11-17 Thread Aaron Brady
On Nov 16, 8:56 pm, Charlie <[EMAIL PROTECTED]> wrote: > > >  But when I try to import test in python, it complains: > > >  import _test > > >  ImportError: ./_test.so undefined symbol: _Z9binary_opiiPFiiiE > > > The above is a mangled name so you've got some C vs C++ problems I'd > > say. > > > Yo

Re: C Function Pointer Wrapping Example not working

2008-11-16 Thread Charlie
> > >  But when I try to import test in python, it complains: > >  import _test > >  ImportError: ./_test.so undefined symbol: _Z9binary_opiiPFiiiE > > The above is a mangled name so you've got some C vs C++ problems I'd > say. > > You could try putting some extern "C" {} in around all the functio

Re: C Function Pointer Wrapping Example not working

2008-11-16 Thread Nick Craig-Wood
Charlie <[EMAIL PROTECTED]> wrote: > I am new to using swig/C++/python. I got some problem with function > pointers. I posted in swig-user, but got no response. So I forwarded > it here. You help is greatly appreciated. > > Thanks! > > > Hi All, > > Yesterday I posted about the question I

C Function Pointer Wrapping Example not working

2008-11-14 Thread Charlie
Hi All, I am new to using swig/C++/python. I got some problem with function pointers. I posted in swig-user, but got no response. So I forwarded it here. You help is greatly appreciated. Thanks! -- Forwarded message -- Hi All, Yesterday I posted about the question I had of temp