>From: JonY
>Date: Thu, 05 Dec 2013 17:23:48 +0800
>Subject: Re: [Mingw-w64-public] Using MinGW-w64
>On 12/5/2013 12:58, wynfield wrote:
>> # I then tried to compile it, but it failed as soon below.
>>
>> $ /bin/i686-w64-mingw32-gcc.exe hello.c
>> i686-w64-mingw32-gcc: error: spawn: No such file or directory
>>
>>
>Don't do that, just use i686-w64-mingw32-gcc, or
>/usr/bin/i686-w64-mingw32-gcc, but not /bin/i686-w64-mingw32-gcc.
I followed JonY's instruction and invoked the compiler simply as
i686-w64-mingw32-gcc.
I does get to the compiler now. Thank you.
Next I'm getting a linking error as follows from this example code on MinGW-w64
site.
--------------------------------
#define _UNICODE
#define UNICODE
#include <tchar.h>
int _tmain(int argc, _TCHAR **argv)
{
_tprintf(__T("Hello\n"));
return 0;
}
--------------------------------
Note: I am assuming the example given is oomplete and that <tchar.h> covers
what
normal stdio.h and stdlib.h do.
$ i686-w64-mingw32-gcc hello.c
/usr/i686-w64-mingw32/sys-root/mingw/lib/../lib/libmingw32.a(lib32_libmingw32_a-crt0_c.o):
In function `main':
/usr/src/debug/mingw64-i686-runtime-3.0.0-1/crt/crt0_c.c:18: undefined
reference to `WinMain@16'
collect2: error: ld returned 1 exit status
[ undefined reference to `WinMain@16' ]
Advice on solving this is appreciated.
Thank you.
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public