[cfe-dev] Built on MinGW and error in running basic compiation

Duncan McQueen dwmcqueen at openthinkingsystems.com
Mon Jun 14 06:14:42 PDT 2010


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.c
In 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 McQueen
OpenThinking Systems, LLC
http://www.openthinkingsystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100614/67c70101/attachment.html>


More information about the cfe-dev mailing list