[C++-sig] Problem Wrapping DirectX with Boost Python

Mark Russell mrussell8081 at pacbell.net
Tue Nov 12 18:16:37 CET 2002

I am using Boost Python to wrap DirectX and have run into a problem I can't
seem to get around.  Def seems to have trouble with __stdcall this works ok
for me when I call bind directly so I'm not sure where to go from here.  I
have attached a short test example cloned from the bind tests to show where
the problem is.  I am using msvc 6.5 and have tried both boost 1.29 and the
latest from CVS.  Thanks in advance

Test Code:


#include <boost/python.hpp>
using namespace boost::python;

long __stdcall f_0()
    return 17041L;

    def("f_0", f_0);


Error Message:

c:\boost\boost\python\detail\arg_tuple_size.hpp(61) : error C2664: 'struct
boost::python::detail::char_array<0> __cdecl
boost::python::detail::arg_tuple_size_helper(long (__cdecl *)(void))' :
cannot convert parameter 1 from 'long (__stdcall *)(void)
' to 'long (__cdecl *)(void)'
        This conversion requires a reinterpret_cast, a C-style cast or
function-style cast

More information about the Cplusplus-sig mailing list