You are not logged in.

#1 2016-01-04 02:38:59

d3x0r
Member
Registered: 2015-08-17
Posts: 42

Failure to build simple C mingw-w64 32 bit -m32 [solved]

I'm trying to compile a simple program

int main() {} 

using
  x86_64-w64-mingw32-gcc -m32 -mwindows test.c

and I just get a long list of

/usr/lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld: cannot find -lmsvcrt

I assume this should be searching in

/usr/i686-w64-mingw32/lib ... but it doesn't.

-----
Edit: Oh; I guess there's i686-w64-mingw32-* that I should be using instead ... thought I had searched for those correctly but I missed them.

Last edited by d3x0r (2016-02-29 17:23:24)

Offline

#2 2016-01-05 08:50:49

mpan
Member
Registered: 2012-08-01
Posts: 1,208
Website

Re: Failure to build simple C mingw-w64 32 bit -m32 [solved]

Drop -m32 option? Why are you passing an option that forces building for i868 in a tool for x86_64?


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#3 2016-02-29 17:23:07

d3x0r
Member
Registered: 2015-08-17
Posts: 42

Re: Failure to build simple C mingw-w64 32 bit -m32 [solved]

Okay so there are two entirely different comipler chains that get deployed for MinGW 
x86_64-w64-mingw32 and i686-w64-mingw32

Offline

Board footer

Powered by FluxBB