[Pyrex] compiler requires explicit cast?
horace
horace3d at gmail.com
Tue Jun 30 11:06:30 CEST 2009
On Mon, Jun 29, 2009 at 2:35 AM, Greg Ewing <greg.ewing at canterbury.ac.nz>wrote:
> horace wrote:
>
> hm... all HINSTANCE definitions i find in the windows sdk are void *.
>>
>> any other ideas?
>>
>
> Not really. You may need to dig into the generated
> C code and find out exactly what the C compiler is
> complaining about. Somewhere there must be a mismatch
> between the Pyrex declarations and what the C compiler
> is seeing.
i got it to compile by manually replacing this:
__pyx_t_2 = PyInt_FromLong(((long)LoadIcon(((void *)((long)__pyx_t_3)),
((char *)1))));
with this:
__pyx_t_2 = PyInt_FromLong(((long)LoadIcon(((HINSTANCE)((long)__pyx_t_3)),
((char *)1))));
in the generated cpp file.
having to manually do this is a bit annoying but at least i got it working.
is it possible to define some script or function that gets executed after
generating the cpp file in setup.py?
> --
> Greg
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.copyleft.no/pipermail/pyrex/attachments/20090630/fa6f7fad/attachment.html>
More information about the Pyrex
mailing list