Page 1 of 1

Windows Compile Error

Posted: Sun Jun 02, 2019 4:50 am
by TomL12953
I'm trying to compile MicroPython 1.11 in Windows by typing make at a command prompt and I get the errors below. I tried compiling in both Cygwin 64 and in native Windows and I get the same error in both. What am I doing wrong?

Errors:

../../py/obj.h:85:17: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
{ return ((((mp_int_t)(o)) & 1) != 0); }
^
../../py/obj.h: In function 'mp_obj_is_qstr':
../../py/obj.h:90:17: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
{ return ((((mp_int_t)(o)) & 3) == 2); }
^
../../py/obj.h: In function 'mp_obj_is_obj':
../../py/obj.h:106:17: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
{ return ((((mp_int_t)(o)) & 3) == 0); }
^
cc1: all warnings being treated as errors
make: *** [../../py/mkrules.mk:47: build/py/mpstate.o] Error 1

Re: Windows Compile Error

Posted: Sun Aug 25, 2019 7:03 am
by markcowell23
[quote=TomL12953 post_id=37052 time=1559451059 user_id=5380]
I'm trying to compile MicroPython 1.11 in Windows by typing make at a command prompt and I get the errors below. I tried https://bestwashingmachine.in compiling in both Cygwin 64 and in native Windows and I get the same error in both. What am I doing wrong?

Errors:

../../py/obj.h:85:17: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
{ return ((((mp_int_t)(o)) & 1) != 0); }
^
../../py/obj.h: In function 'mp_obj_is_qstr':
../../py/obj.h:90:17: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
{ return ((((mp_int_t)(o)) & 3) == 2); }
^
../../py/obj.h: In function 'mp_obj_is_obj':
../../py/obj.h:106:17: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
{ return ((((mp_int_t)(o)) & 3) == 0); }
^
cc1: all warnings being treated as errors
make: *** [../../py/mkrules.mk:47: build/py/mpstate.o] Error 1
[/quote]

Hi forum admin I'm facing same issue please help us

Re: Windows Compile Error

Posted: Sun Aug 25, 2019 7:54 am
by stijn
I tried compiling in both Cygwin 64 and in native Windows and I get the same error in both
Can you explain what 'Cygwin 64' is, and 'native Windows'? I.e. which compiler version etc? And which port are you trying to build (the unix one or the windows one)?

In any case: the only thing which is completely supported and working on Windows is the windows port built with Mingw-w64 (well, and the msvc port). I.e. you need Cygwin or MSys2 with make and Mingw-w64 installed.

Other things like using Mingw or building the unix port with Cygwin's gcc aren't supported, though might build with a little bit of work.