[cfe-dev] stddef doesn't support for wint_t at windows mingw.

Daniel Dunbar daniel at zuster.org
Sun Aug 9 15:24:15 PDT 2009


On Sun, Aug 9, 2009 at 12:05 PM, Eli Friedman<eli.friedman at gmail.com> wrote:
> On Sun, Aug 9, 2009 at 5:34 AM, 罗勇刚(Yonggang Luo)<luoyonggang at gmail.com> wrote:
>> Once I compiled clang+llvm by mingw or msvc.
>> I set the environment.
>> And I calling the command clang hello.c -o hello.exe
>> But it's doesn't working. Because It's can't find out the stddef.h.
>> And this file is placed at  Headers. And this path "path/Headers" is
>> not add to the default path of mingw.
>> So I need to call it like this
>>  clang hello.c -ID:/clang/Headers -o hello.exe
>
> I'm sorry, it's extremely difficult to follow this description, but
> essentially, clang isn't finding its headers?  Can you provide the
> output of something like "clang -v hello.c"?

I believe the problem isn't that clang can't find stdarg.h, rather the
include_next of stdarg.h fails.

>> But it's tell me the don't know the identifier wint_t.
>> And I found the in the mingw c runtime headers. It's doesn't define wint_t.
>> So I need to define wint_t in stddef.h.
>
> wint_t?  stddef.h isn't supposed to define wint_t; it's supposed to be
> defined in wchar.h.  If gcc's stddef.h really does define wint_t on
> MinGW , though, we have no choice but to follow, I guess...

I have this problem as well, but things work a lot better if I point
clang at the MSVC version of the headers instead of the mingw ones. If
someone feels like investigating I can provide preprocessed versions
of some inputs.

 - Daniel

> -Eli
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>




More information about the cfe-dev mailing list