4

I am trying to compile Niotso, however I am running into issues when building from source.

I think I might have missed something obvious, so if anyone knows what I may have done wrong, please let me know

c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: skipping incompatible c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32
/4.8.1/../../../../x86_64-w64-mingw32/lib/libmsvcrt.a when searching for -lmsvcrt
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: skipping incompatible c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32
/4.8.1/../../../../x86_64-w64-mingw32/lib\libmsvcrt.a when searching for -lmsvcrt
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: skipping incompatible c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32
/4.8.1/../../../../x86_64-w64-mingw32/lib/libmsvcrt.a when searching for -lmsvcrt
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: cannot find -lmsvcrt
collect2.exe: error: ld returned 1 exit status
_deps\freetype\CMakeFiles\freetype_shared.dir\build.make:323: recipe for target
'../_dist/windows/freetype.dll' failed
mingw32-make[2]: *** [../_dist/windows/freetype.dll] Error 1
CMakeFiles\Makefile2:77: recipe for target '_deps/freetype/CMakeFiles/freetype_s
hared.dir/all' failed
mingw32-make[1]: [_deps/freetype/CMakeFiles/freetype_shared.dir/all] Error 2
Makefile:74: recipe for target 'all' failed
mingw32-make: [all] Error 2
Alexander Shukaev
  • 16,674
  • 8
  • 70
  • 85
Zeusking19-Code
  • 75
  • 1
  • 2
  • 8
  • 1
    Looks to me like you're building a 32 bit application when you only have the 64 bit libraries available. But I am guessing. – john Oct 13 '13 at 13:09

1 Answers1

4

Your distribution of MinGW toolchain is single-target and is targeting 64-bit. Probably somewhere in the build system of Niotso the -m32 switch is included which enforces 32-bit compilation mode. But since your toolchain does not contain 32-bit version of libmsvcrt.a it complains that it indeed finds the 64-bit version of libmsvcrt.a, but it wants the 32-bit one, and therefore skips the former.

You have 3 options:

  1. Look through the build system of Niotso (whatever it is) for the -m32 flag and try eliminating it, then you'd produce 64-bit binaries of Niotso;
  2. Change MinGW distribution to the single-target (targeting 32-bit), then you'd produce 32-bit binaries of Niotso;
  3. Change MinGW distribution to the dual-target (targeting both 32-bit and 64-bit), then you'd produce 32-bit binaries of Niotso once again;

    NOTE: The only toolchains I know to be dual-target are TDM-GCC and SJLJ-based MinGW-w64.

Alexander Shukaev
  • 16,674
  • 8
  • 70
  • 85