Dear List,
(this is my first post to a devel mailing so please be patient with me)
I spent about 60 hours getting boost v1 to work with my program Vega Strike; and it has performed admirably thus far; however, I noticed certain problems with boost in gcc-3.2 (in retrospect they could have been my python script....but I decided to move ahead anyway)
so I'm trying to get boost v2 to work with http://vegastrike.sourceforge.net/
and it appears to be 100% working ( to_python converted to that big macro, sloppy casts of "member" functions that included something that casted to the true member function has been removed)

but I get a type error when trying to call a function with a tuple that really takes a Vector.
struct Vector {
float i; float j; float k;
};

This is because I have not figured out how to properly define a from_python operator in boost v2... I have scoured google and all the docs and have only encountered half-debates on what convention to use and no solid rules--and I cannot appear to make anything I have tried work.

can anyone point me to some documentation on which functioN I should make that takes in a PyObject * and return a Vector so that I can call functions that take a Vector as an argument?

my old from_python method is as follows:
inline Vector from_python(PyObject *p,boost::python::type<Vector>) {
Vector vec(0,0,0);
PyArg_ParseTuple(p,"fff",&vec.i,&vec.j,&vec.k);
return vec;
}
error checking is not required :-)

if anyone can help me get this function to work in v2 I believe the rest of my code will magically work (because

the only functions currently failing involve taking IN vectors...returning them is accomplished with
BOOST_PYTHON_TO_PYTHON_BY_VALUE(QVector, boost::python::to_python_value<boost::python::tuple> ()(bo\
ost::python::make_tuple((double)x.i,(double)x.j,(double)x.k)));

is the above calling syntax going to be portable to newer versions of boost? or am I going to have to scour through millions of header files for version 1.30?

anyhow thanks for a great library....
unfortunately only boost v1 compiles on my macintosh with gcc-3.1
it appears there is a preprocessing error with gcc-3.1 :-( and I'm not sure what to do about it...

it says: (postprocessed)

template < typename 0 = mpl::void_ , typename B1 = mpl::void_ , typename B2 = mpl::void_ , typena\
me B3 = mpl::void_ , typename B4 = mpl::void_ , typename B5 = mpl::void_ , typename B6 = mpl::void_\
, typename B7 = mpl::void_ , typename B8 = mpl::void_ , typename B9 = mpl::void_ >
struct bases : detail::type_list< B0 , B1 , B2 , B3 , B4 , B5 , B6 , B7 , B8 , B9 >::type
{};

where I think it means B0 instead of just plain ole 0....
I think it's a gcc-3.1 b0rken sign but I don't know how to get around it :-/ at least Vega Strike is backwards compatible with boostv1

thanks for your time and I'd appreciate any answer you could give or up-to-date help documents you could point me to.....

thanks Daniel







_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to