Re: compiler requires explicit cast?
horace <[email protected]> Tue, 30 Jun 2009 11:06:30 +0200
| Newsgroups | gmane.comp.python.pyrex |
|---|---|
| Message-ID | <[email protected]> |
--===============1815090785== Content-Type: multipart/alternative; boundary=001636c5acf85ced94046d8d1f15 --001636c5acf85ced94046d8d1f15 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Mon, Jun 29, 2009 at 2:35 AM, Greg Ewing <[email protected]>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 > --001636c5acf85ced94046d8d1f15 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <br><div class=3D"gmail_quote">On Mon, Jun 29, 2009 at 2:35 AM, Greg Ewing = <span dir=3D"ltr"><<a href=3D"mailto:[email protected]">greg.e= [email protected]</a>></span> wrote:<br><blockquote class=3D"gmail_q= uote" style=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0= pt 0.8ex; padding-left: 1ex;"> horace wrote:<br> <br> <blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, = 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class=3D"im"= > hm... all HINSTANCE definitions i find in the windows sdk are void *.<br> <br></div> any other ideas?<br> </blockquote> <br> Not really. You may need to dig into the generated<br> C code and find out exactly what the C compiler is<br> complaining about. Somewhere there must be a mismatch<br> between the Pyrex declarations and what the C compiler<br> is seeing.</blockquote><div><br><br><br>i got it to compile by manually rep= lacing this:<br><br>__pyx_t_2 =3D PyInt_FromLong(((long)LoadIcon(((void *)(= (long)__pyx_t_3)), ((char *)1))));<br><br>with this:<br><br>__pyx_t_2 =3D P= yInt_FromLong(((long)LoadIcon(((HINSTANCE)((long)__pyx_t_3)), ((char *)1)))= );<br> <br>in the generated cpp file.<br><br>having to manually do this is a bit a= nnoying but at least i got it working.<br><br><br><br>is it possible to def= ine some script or function that gets executed after generating the cpp fil= e in setup.py? <br> <br><br><br></div><blockquote class=3D"gmail_quote" style=3D"border-left: 1= px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"= ><br> -- <br><font color=3D"#888888"> Greg<br> </font></blockquote></div><br> --001636c5acf85ced94046d8d1f15-- --===============1815090785== Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline _______________________________________________ Pyrex mailing list [email protected] http://lists.copyleft.no/mailman/listinfo/pyrex --===============1815090785==--