FAQ:
Index:
General:
Linux:
Windows:
General:
Boost::Python vs SWIG (Aug 28, 2003)
There was some discussion whether pyFLTK should be developed using Boost::Python rather than SWIG. The consensus so far is the following:
- 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.
Linux:
Undefined symbol _Znwj (updated Nov 12, 2003)
According to Hugues Talbot:
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.
Windows:
Compilation using MinGW (Aug 28, 2003)
Compilation with the MinGW environment has been tested for MinGW version 2.0.0 using the MSYS
environment version 1.0.9. See here for a more detailed
description of the build process.
Compilation using Cygwin (Aug 28, 2003)
Compilation with the Cygwin environment has been tested and is equivalent to the
compilation using the MinGW environment.