Friday, October 26, 2007

Hooray for Process Monitor

I have studied SWIG and Boost.Python lately. Combining the speed of C++ with the flexibility of Python appeals to me; I have meant to learn how to for a long time. After an extended struggle, both SWIG and Boost.Python yielded working wrappers for C++ in Python. The last problem resolved was that the Boost.Python wrapper failed to load in Cygwin, with an enigmatic error message.
ImportError: No such file or directory
Process Monitor revealed the secret source of the error: the Boost.Python DLL could not be found in my path. I manually copied the DLL to /usr/local/bin, and the wrapper was fine.

My conclusions are that SWIG is easier to pick up and more popular, though its popularity is declining; while Boost.Python is for those of us that pass the screening test of properly setting up Boost.Build. Although SWIG has its merits, I have decided to stick with Boost.Python.

No comments: