Boost::Python vs SWIG (Aug 28, 2003)
- Boost::Python seems to be more powerful than SWIG, especially for handling cross-language polymorphisms.
- Boost::Python has, compared to SWIG, a very steep learning curve. PYSTE might be an alternative but is as yet not far enough to be used.
- SWIG has lately picked up speed and provides most of the needed features (including some mechanisms for enabling polymorphisms.)
- There was a lot of work from the originator of pyFLTK (Kevin Dahlhausen) that I could use to bring pyFLTK up to speed again.
- Boost::Python does not yet support distutils.
Undefined symbol _Znwj (updated Nov 12, 2003)
This is caused by the C++ library not being available at all to the _fltk.so final library.You can verify whether this is a problem in your case by checking the compiler versions used for building Python and for the extension. You can find out the version of the compiler that was used for building Python by starting the Python interpreter. The version of the compiler installed on your system you might get like this:
In the RedHat 9 case I got the above problem. It was fixed by substituting `c++' for `gcc' in the linking stage, i.e the last line of the result of `python ./setup.py build' should be something like:
c++ -vIf they are equal then very likely the above procedure should help you. To force the usage of c++ (or g++) for linking, proceed as follows:
export LDSHARED=c++ python setup.py build
This problem should only occur for versions of Python before 2.3. For Python 2.3, the new version of distutils will select c++ for building whenever the source file has an extension of the form cxx or cpp, which is the case for the pyFLTK extension.