stddef doesn't support for wint_t at windows mingw.

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
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.

If it's possible, to add Headers to the default path.
Or place Headers to lib/clang/1.0/include

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"?

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...

-Eli

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

output of something like "clang -v hello.c"?

Because of I copied those files that placed at Headers into
D:/Tools/Building/llvm/lib/clang/1.0/include,
And also I copied those headers of mingw-rt and also mingw-w32 into
D:/Tools/Building/llvm/lib/clang/1.0/include
And I used three file comes from Headers overwrite those files comes
from mingw.(float.h stdint.h limits.h)

So it's working.

And also, because I doesn't installing mingw at c:/mingw,
So c:/mingw/include doesn't exist. Maybe it's the problem.
And also I doesn't installing gcc at c:/mingw/include.
And I am working at msys.
By the way. I am confusing why clang calling gcc.exe as a driver and
so it's required mingw-gcc package.
even though I doesn't install it. And just placed it at the
environment variable.
So gcc is working.
And if I placed binutils at clang/1.0/bin. It's not working.

罗勇刚@LYG-PC ~$ clang -v a.c clang -v a.c
clang version 1.0 (http://www.llvm.org/svn/llvm-project/cfe/trunk )
Target: i386-pc-mingw
Thread model: posix
"D:/Tools/Building/llvm/bin/clang-cc.exe" -triple i386-pc-mingw -S
-disable-free -main-file-name a.c --relocation-model static
--disable-fp-elim --unwind-tables=0 --mcpu=pentium4 --fmath-errno=1 -v

Hmm, okay... that sounds like a bug in the build system. The files in
question are supposed to be copied automatically.

-Eli

Wait, no, it sounds more like it doesn't know where to find the system
headers? On a normal Unix-y system, the relevant headers are in
/include or /usr/include, but that obviously isn't going to work here
without some external help... I think some variant of the --sysroot
option might work?

-Eli

-Eli

System root? On windows platform, there is no such an system root:(
And if there is such one, it's clang/1.0/include, or mingw/include,
and either contain header files include in llvm-installed/Headers.