J'essaye d'enrouler une fonction en Python en utilisant Boost.Python
et je rencontre des problèmes quand j'utilise __stdcall
. Voici un exemple:Impossible de compiler l'exemple avec __stdcall dans Boost.Python
#define BOOST_PYTHON_STATIC_LIB
#define BOOST_PYTHON_ENABLE_STDCALL
#include <boost/python.hpp>
#include <boost/python/signature.hpp>
void __stdcall f(void)
{
return;
}
using namespace boost::python;
BOOST_PYTHON_MODULE(MyPyDLL)
{
def("func", f);
}
Quand je tente de compiler je reçois plus de 100 erreurs similaires, mais les 2 premiers sont:
erreur C2780: « boost :: :: mpl vector10 :: type &, T0, T1, T2, T3, T4, T5, T6, T7> boost :: python :: detail :: get_signature (RT (__thiscall ClassT :: * ) (T0, T1, T2, T3, T4) , T5, T6, T7) const, Cible *) ': attend 2 arguments - 1 fourni C: \ boost \ boost_1_62_0_python \ boost \ python \ make_function.hpp 104
erreur C2780: « boost :: mpl :: :: type vector10 &, T0, T1, T2, T3, T4, T5, T6, T7> boost :: :: python détail :: get_signature (RT (__thiscall ClassT :: * ) (T0, T1, T2, T3, T4, T5, T6, T7) Constante volatile, Cible *) ': attend 2 arguments - 1 fourni C: \ boost \ boost_1_62_0_python \ boost \ python \ make_function.hpp 104
Comme vous pouvez le voir, je le définir BOOST_PYTHON_ENABLE_STDCALL
, qui est mentionné dans this page:
mais le problème reste le s ame avec ou sans le définir.
Est-ce que quelqu'un sait ce que je fais mal?