ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> cpp-sig
cpp-sig
[C++-sig] Problem Wrapping DirectX with Boost Python
by Mark Russell other posts by this author
Nov 12 2002 5:16PM messages near this date
Re: [C++-sig] Static, again... | [C++-sig] Re: Python + Boost Python V2 + downcasting
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:

#define BOOST_BIND_ENABLE_STDCALL
#define BOOST_MEM_FN_ENABLE_STDCALL

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

long __stdcall f_0()
{
    return 17041L;
}


BOOST_PYTHON_MODULE_INIT(test_std_call)
{
    def("f_0", f_0);

}

Error Message:

Compiling...
stdcall.cpp
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


_______________________________________________
C++-sig mailing list
C++-sig@[...].org
http://mail.python.org/mailman/listinfo/c++-sig

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved