[cfe-dev] Built on MinGW and error in running basic compiation
John
shangbuqixing at 163.com
Tue Jul 27 20:01:42 PDT 2010
Duncan McQueen <dwmcqueen at ...> writes:
>
>
> Helo,I built Clang using MinGW. Everything seemed to go well in the build.
However, when I ran a simple test (compilation of the following using 'clang
t.c'):#include <stdio.h>
> int main(int argc, char **argv) { printf("hello world\n"); }I get these
messages:C:\Tools\build.llvm\testcomp>clang t.cIn file included from
t.c:1:c:/mingw/include/stdio.h:571:9: error: unknown type name 'wint_t'
> _CRTIMP wint_t __cdecl __MINGW_NOTHROW fgetwc (FILE*);
^c:/mingw/include/stdio.h:571:16: error: expected identifier or '('_CRTIMP
wint_t __cdecl __MINGW_NOTHROW fgetwc (FILE*); ^
> In file included from t.c:1:In file included from
c:/mingw/include/stdio.h:19:c:/mingw/include/_mingw.h:145:20: note:
instantiated from:# define __cdecl __attribute__
((__cdecl__)) ^
> In file included from t.c:1:c:/mingw/include/stdio.h:572:9: error: unknown
type name 'wint_t'_CRTIMP wint_t __cdecl __MINGW_NOTHROW fputwc (wchar_t,
FILE*); ^c:/mingw/include/stdio.h:572:16: error: expected identifier
or '('
> _CRTIMP wint_t __cdecl __MINGW_NOTHROW fputwc (wchar_t,
FILE*); ^In file included from t.c:1:In file included from
c:/mingw/include/stdio.h:19:c:/mingw/include/_mingw.h:145:20: note:
instantiated from:
> # define __cdecl __attribute__ ((__cdecl__)) ^In file
included from t.c:1:c:/mingw/include/stdio.h:573:9: error: unknown type
name 'wint_t'_CRTIMP wint_t __cdecl __MINGW_NOTHROW ungetwc (wchar_t, FILE*);
> ^c:/mingw/include/stdio.h:573:16: error: expected identifier
or '('_CRTIMP wint_t __cdecl __MINGW_NOTHROW ungetwc (wchar_t,
FILE*); ^In file included from t.c:1:In file included from
c:/mingw/include/stdio.h:19:
> c:/mingw/include/_mingw.h:145:20: note: instantiated from:# define __cdecl
__attribute__ ((__cdecl__)) ^In file included from
t.c:1:c:/mingw/include/stdio.h:584:9: error: unknown type name 'wint_t'
> _CRTIMP wint_t __cdecl __MINGW_NOTHROW getwc (FILE*);
^c:/mingw/include/stdio.h:584:16: error: expected identifier or '('_CRTIMP
wint_t __cdecl __MINGW_NOTHROW getwc (FILE*); ^
> In file included from t.c:1:In file included from
c:/mingw/include/stdio.h:19:c:/mingw/include/_mingw.h:145:20: note:
instantiated from:# define __cdecl __attribute__
((__cdecl__)) ^
> In file included from t.c:1:c:/mingw/include/stdio.h:585:9: error: unknown
type name 'wint_t'_CRTIMP wint_t __cdecl __MINGW_NOTHROW getwchar
(void); ^c:/mingw/include/stdio.h:585:16: error: expected identifier
or '('
> _CRTIMP wint_t __cdecl __MINGW_NOTHROW getwchar (void); ^In
file included from t.c:1:In file included from
c:/mingw/include/stdio.h:19:c:/mingw/include/_mingw.h:145:20: note:
instantiated from:
> # define __cdecl __attribute__ ((__cdecl__)) ^In file
included from t.c:1:c:/mingw/include/stdio.h:587:9: error: unknown type
name 'wint_t'_CRTIMP wint_t __cdecl __MINGW_NOTHROW putwc (wint_t, FILE*);
> ^c:/mingw/include/stdio.h:587:16: error: expected identifier
or '('_CRTIMP wint_t __cdecl __MINGW_NOTHROW putwc (wint_t,
FILE*); ^In file included from t.c:1:In file included from
c:/mingw/include/stdio.h:19:
> c:/mingw/include/_mingw.h:145:20: note: instantiated from:# define __cdecl
__attribute__ ((__cdecl__)) ^In file included from
t.c:1:c:/mingw/include/stdio.h:589:9: error: unknown type name 'wint_t'
> _CRTIMP wint_t __cdecl __MINGW_NOTHROW putwchar (wint_t);
^c:/mingw/include/stdio.h:589:16: error: expected identifier or '('_CRTIMP
wint_t __cdecl __MINGW_NOTHROW putwchar (wint_t); ^
> In file included from t.c:1:In file included from
c:/mingw/include/stdio.h:19:c:/mingw/include/_mingw.h:145:20: note:
instantiated from:# define __cdecl __attribute__
((__cdecl__)) ^
> In file included from t.c:1:c:/mingw/include/stdio.h:630:9: error: unknown
type name 'wint_t'_CRTIMP wint_t __cdecl __MINGW_NOTHROW _fgetwchar
(void); ^c:/mingw/include/stdio.h:630:16: error: expected identifier
or '('
> _CRTIMP wint_t __cdecl __MINGW_NOTHROW _fgetwchar (void); ^In
file included from t.c:1:In file included from
c:/mingw/include/stdio.h:19:c:/mingw/include/_mingw.h:145:20: note:
instantiated from:
> # define __cdecl __attribute__ ((__cdecl__)) ^In file
included from t.c:1:c:/mingw/include/stdio.h:631:9: error: unknown type
name 'wint_t'_CRTIMP wint_t __cdecl __MINGW_NOTHROW _fputwchar (wint_t);
> ^c:/mingw/include/stdio.h:631:16: error: expected identifier
or '('_CRTIMP wint_t __cdecl __MINGW_NOTHROW _fputwchar
(wint_t); ^In file included from t.c:1:In file included from
c:/mingw/include/stdio.h:19:
> c:/mingw/include/_mingw.h:145:20: note: instantiated from:# define __cdecl
__attribute__ ((__cdecl__)) ^In file included from
t.c:1:c:/mingw/include/stdio.h:636:9: error: unknown type name 'wint_t'
> _CRTIMP wint_t __cdecl __MINGW_NOTHROW fgetwchar (void); ^fatal
error: too many errors emitted, stopping now [-ferror-limit=]20 errors
generated.-- Duncan McQueenOpenThinking Systems,
LLChttp://www.openthinkingsystems.com
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at ...
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
Hi:
I am using cygwin to build llvm and clang.I meet the same question as you
description. Have you soluted the question? If you have soluted, please email
me ! Thanks you
More information about the cfe-dev
mailing list