On Wed, Sep 21, 2011 at 2:54 AM, Brett Calcott <brett.calc...@gmail.com> wrote: > Hi. I've just reverted to 0.14.1 because 0.15 breaks code that implements a > cpp callback in python. It seems to be a name-mangling problem. > I've attached a short test case that shows the problem. They both compile > fine on 14.1 and 15. But if I try and run the 15 compiled version I get > this: > Traceback (most recent call last): > File "try_hello.py", line 1, in <module> > import test > ImportError: > dlopen(/Users/brett/Dropbox/Code/kli-project/cython-test/test.so, 2): Symbol > not found: __Z19callback_test_helloP7_objecti > Referenced from: /Users/brett/Dropbox/Code/kli-project/cython-test/test.so > Expected in: dynamic lookup > Is there anything new I should be doing?
This is probably https://github.com/cython/cython/commit/c9765a85e1f11a61c604890435b8cebdd49e4cca which means your declaration of callback_test_hello in callbacks.cpp also needs to be extern "c" to have the same (i.e. no) mangling. - Robert _______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel