[C++-sig] using windows api functions

blackmet blackmet blackmet.darkangel at gmail.com
Sat Nov 7 15:58:10 CET 2009


2009/11/7 Stefan Seefeld <seefeld at sympatico.ca>

> On 11/07/2009 08:43 AM, blackmet blackmet wrote:
>
>>
>> c:/boost_1_40_0/boost/python/make_function.hpp:103: error:
>> invalid conversion from `int (*)(HINSTANCE__*, HINSTANCE__*, CHAR*, int)'
>> to `int (*)(HINSTANCE__*, HINSTANCE__*, CHAR*, int)'
>> c:/boost_1_40_0/boost/python/make_function.hpp:103: error:
>> initializing argument 1 of `boost::mpl::vector5<T0, T1, T2, T3, T4>
>> boost::python::detail::get_signature(RT (*)(T0, T1, T2, T3), void*)
>> [with RT = int, T0 = HINSTANCE__*, T1 = HINSTANCE__*, T2 = CHAR*, T3 =
>> int]'
>>
>
> That is a confusing error message, isn't it. I seem to recall having seen
> similar errors in the past, though I don't recall what caused it. Can you
> show the declaration of the function that you are attempting to wrap ? Could
> it be that it is using non-standard calling conventions (stdcall, fastcall,
> or some such), causing the compiler to detect a mismatch, without being able
> to report a clear error message ?
>
> It is quite simple:

BOOST_PYTHON_MODULE(_winmain)
{
using namespace boost::python;
def("WinMain", WinMain);

}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20091107/ac9453dd/attachment.htm>


More information about the Cplusplus-sig mailing list