[cfe-dev] C Standard Library
Sebastian Redl
sebastian.redl at getdesigned.at
Tue Dec 21 11:49:17 PST 2010
On 21.12.2010, at 20:41, Antony Vennard wrote:
> Hello,
>
> On 21/12/10 19:19, Douglas Gregor wrote:
>>
>> On Dec 21, 2010, at 11:12 AM, Antony Vennard wrote:
>>
>>> Hi All,
>>>
>>> I am aware of the libcxx project providing a standard library for C++
>>> for use with clang. Is there an equivalent project for C?
>>
>> To my knowledge, there is no such project. Clang aims to work with the system C library on a variety of platforms.
>>
>
> Ok, I've just tried what I was having problems with and understood it
> this time (last time was after a build which took several hours):
>
> #error: ERROR: Only Win32 target supported!
>
> When trying to compile a simple hello world application with my just
> built clang.
>
> clang -o hello.exe -D_WIN32 hello.c fixes the problem.
>
> Is there any way to build these automatic defines into clang? Or have I
> done something wrong in compilation?
I believe passing -ms-extensions pre-defines various macros that MSVC defines.
Sebastian
More information about the cfe-dev
mailing list