On Wed, 12 Jun 2013 11:34:24 +0100, Holger Brandsmeier
<brandsme...@gmx.de> wrote:
Trevor,
ok, so I misunderstood your question. If what you want to do is this:
---- myclass.h
class MyClass {
[...]
};
---- pythonFile.cpp
#include "myclass.h"
[...]
BOOST_PYTHON_MODULE(...) {
[...]
}
That is certainly possible, I think almost everyone (including me)
does it like this.
Yea, this is kind of how I do it, but I don't include the class headers
into the file containing BOOST_PYTHON_MODULE; I just forward declare a
load of RegisterFooClass functions, and then call them within the
BOOST_PYTHON_MODULE. Doing it this way I find, makes the file containing
the BOOST_PYTHON_MODULE a lot smaller and it compiles a lot faster. All it
needs to include is <boost/python/module.hpp>.
Also, I am not tied to usnig bjam, that is just what the boost.python
tutorial recommended. How are you compiling your python extension
modules? Can you point me to some information about it?
I recommend you to use bjam, I simply can not help you about it.
Yea, I don't use bjam either... I'm using Python's distutils, which is not
all that recommendable. I'd probably recommend using Makefile's. I'm sure
you can find some relevant tutorials online...
Cheers,
Alex
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig