:

can't build samples in samples directory. using windows 10 and mingw64

Added by: ~Andy, 2016 VII 04

Added by: ~Andy, 2016 VII 04

just tried running the Makefile with mingw32-make -f Makefile
I get
-but-set-variable]
C:\Users\andy\AppData\Local\Temp\ccQJ4Xi2.s: Assembler messages:
C:\Users\andy\AppData\Local\Temp\ccQJ4Xi2.s:110: Error: operand type mismatch for `movq'
C:\Users\andy\AppData\Local\Temp\ccQJ4Xi2.s:111: Error: incorrect register `%eax' used with `q' suffix
C:\Users\andy\AppData\Local\Temp\ccQJ4Xi2.s:653: Error: operand type mismatch for `movq'
C:\Users\andy\AppData\Local\Temp\ccQJ4Xi2.s:654: Error: incorrect register `%eax' used with `q' suffix
C:\Users\andy\AppData\Local\Temp\ccQJ4Xi2.s:744: Error: operand type mismatch for `movq'

types of errors.
g++ is version 5.3.0

Added by: tomek, 2016 VII 04

I will check this tomorrow with mingw64.

Added by: ~t, 2016 VII 06, Last modified by: tomek, 2016 VII 06

I have downloaded the mingw64 package from https://sourceforge.net/projects/mingw-w64/ and compilation went fine but option '-static' should also be used with CFLAGS in order to staticly compile the c++ std lib to the executables.

c:\ttmath-0.9.3\samples>g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=c:/gcc-4.9-win32/bin/../libexec/gcc/i686 -w64-mingw32/4.9.4/l
to-wrapper.exe
Target: i686-w64-mingw32
Configured with: /home/cauchy/vcs/svn/gcc/branches/gcc-4_9-branch/configure --pr
efix=/home/cauchy/native/gcc-4.9-win32 --with-sysroot=/home/cauchy/native/gcc-4.
9-win32 --build=x86_64-unknown-linux-gnu --host=i686-w64-mingw32 --target=i686-w
64-mingw32 --disable-multilib --disable-nls --disable-win32-registry --enable-ch
ecking=release --enable-languages=c,c++,fortran --enable-fully-dynamic-string --
with-arch=core2 --with-tune=generic
Thread model: win32
gcc version 4.9.4 20160701 (prerelease) (GCC)

c:\ttmath-0.9.3\samples>uint.exe
Simple calculating
a = 123456
b = 9876
a + b = 133332
a - b = 113580
a * b = 1219251456
a / b = 12
Calculating with a carry
a = 18446744073709551615
b = 5
a + b = (carry: the result is too big) 4
a - b = 18446744073709551610
a * b = (carry: the result is too big)
a / b = 3689348814741910323